@renterra/sdk 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2728 @@
1
+ export const toolSchemas = {
2
+ "search_customers": {
3
+ "input": {
4
+ "$schema": "http://json-schema.org/draft-07/schema#",
5
+ "type": "object",
6
+ "properties": {
7
+ "page": {
8
+ "default": 0,
9
+ "type": "integer",
10
+ "minimum": 0,
11
+ "maximum": 9007199254740991
12
+ },
13
+ "page_size": {
14
+ "default": 10,
15
+ "type": "integer",
16
+ "minimum": 1,
17
+ "maximum": 50
18
+ },
19
+ "query": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 191
23
+ }
24
+ },
25
+ "additionalProperties": false
26
+ },
27
+ "output": {
28
+ "$schema": "http://json-schema.org/draft-07/schema#",
29
+ "type": "object",
30
+ "properties": {
31
+ "data": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "properties": {
36
+ "id": {
37
+ "type": "string"
38
+ },
39
+ "created_at": {
40
+ "type": "string",
41
+ "format": "date-time",
42
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
43
+ },
44
+ "updated_at": {
45
+ "type": "string",
46
+ "format": "date-time",
47
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
48
+ },
49
+ "is_archived": {
50
+ "type": "boolean"
51
+ },
52
+ "archived_at": {
53
+ "anyOf": [
54
+ {
55
+ "type": "string",
56
+ "format": "date-time",
57
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
58
+ },
59
+ {
60
+ "type": "null"
61
+ }
62
+ ]
63
+ },
64
+ "deleted_at": {
65
+ "anyOf": [
66
+ {
67
+ "type": "string",
68
+ "format": "date-time",
69
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
70
+ },
71
+ {
72
+ "type": "null"
73
+ }
74
+ ]
75
+ },
76
+ "name": {
77
+ "type": "string"
78
+ },
79
+ "type": {
80
+ "type": "string",
81
+ "enum": [
82
+ "Individual",
83
+ "Company"
84
+ ]
85
+ },
86
+ "status": {
87
+ "type": "string",
88
+ "enum": [
89
+ "ACTIVE",
90
+ "PREVIOUS",
91
+ "UNDESIRABLE",
92
+ "PROSPECTIVE",
93
+ "CREDIT_HOLD"
94
+ ]
95
+ },
96
+ "account_type": {
97
+ "type": "string",
98
+ "enum": [
99
+ "Cash",
100
+ "Account"
101
+ ]
102
+ },
103
+ "billing_email": {
104
+ "type": [
105
+ "string",
106
+ "null"
107
+ ]
108
+ },
109
+ "website": {
110
+ "type": [
111
+ "string",
112
+ "null"
113
+ ]
114
+ },
115
+ "primary_contact_id": {
116
+ "type": [
117
+ "string",
118
+ "null"
119
+ ]
120
+ },
121
+ "credit_balance": {
122
+ "type": "number",
123
+ "description": "Current customer credit balance in dollars."
124
+ },
125
+ "total_revenue": {
126
+ "type": "number",
127
+ "description": "Total recognized customer revenue in dollars."
128
+ },
129
+ "ytd_revenue": {
130
+ "type": "number",
131
+ "description": "Year-to-date recognized customer revenue in dollars."
132
+ },
133
+ "address": {
134
+ "anyOf": [
135
+ {
136
+ "type": "object",
137
+ "properties": {
138
+ "address_line_1": {
139
+ "type": "string"
140
+ },
141
+ "address_line_2": {
142
+ "type": [
143
+ "string",
144
+ "null"
145
+ ]
146
+ },
147
+ "locality": {
148
+ "type": "string"
149
+ },
150
+ "administrative_area": {
151
+ "type": "string"
152
+ },
153
+ "postal_code": {
154
+ "type": [
155
+ "string",
156
+ "null"
157
+ ]
158
+ },
159
+ "country": {
160
+ "type": [
161
+ "string",
162
+ "null"
163
+ ]
164
+ }
165
+ },
166
+ "required": [
167
+ "address_line_1",
168
+ "address_line_2",
169
+ "locality",
170
+ "administrative_area",
171
+ "postal_code",
172
+ "country"
173
+ ]
174
+ },
175
+ {
176
+ "type": "null"
177
+ }
178
+ ]
179
+ }
180
+ },
181
+ "required": [
182
+ "id",
183
+ "created_at",
184
+ "updated_at",
185
+ "is_archived",
186
+ "archived_at",
187
+ "deleted_at",
188
+ "name",
189
+ "type",
190
+ "status",
191
+ "account_type",
192
+ "billing_email",
193
+ "website",
194
+ "primary_contact_id",
195
+ "credit_balance",
196
+ "total_revenue",
197
+ "ytd_revenue",
198
+ "address"
199
+ ]
200
+ }
201
+ },
202
+ "pagination": {
203
+ "type": "object",
204
+ "properties": {
205
+ "page": {
206
+ "type": "integer",
207
+ "minimum": -9007199254740991,
208
+ "maximum": 9007199254740991
209
+ },
210
+ "page_size": {
211
+ "type": "integer",
212
+ "minimum": -9007199254740991,
213
+ "maximum": 9007199254740991
214
+ },
215
+ "has_more": {
216
+ "type": "boolean"
217
+ }
218
+ },
219
+ "required": [
220
+ "page",
221
+ "page_size",
222
+ "has_more"
223
+ ]
224
+ }
225
+ },
226
+ "required": [
227
+ "data",
228
+ "pagination"
229
+ ]
230
+ }
231
+ },
232
+ "get_customer": {
233
+ "input": {
234
+ "$schema": "http://json-schema.org/draft-07/schema#",
235
+ "type": "object",
236
+ "properties": {
237
+ "id": {
238
+ "type": "string",
239
+ "minLength": 12,
240
+ "maxLength": 12
241
+ }
242
+ },
243
+ "required": [
244
+ "id"
245
+ ],
246
+ "additionalProperties": false
247
+ },
248
+ "output": {
249
+ "type": "object",
250
+ "properties": {
251
+ "id": {
252
+ "type": "string"
253
+ },
254
+ "created_at": {
255
+ "type": "string",
256
+ "format": "date-time",
257
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
258
+ },
259
+ "updated_at": {
260
+ "type": "string",
261
+ "format": "date-time",
262
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
263
+ },
264
+ "is_archived": {
265
+ "type": "boolean"
266
+ },
267
+ "archived_at": {
268
+ "anyOf": [
269
+ {
270
+ "type": "string",
271
+ "format": "date-time",
272
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
273
+ },
274
+ {
275
+ "type": "null"
276
+ }
277
+ ]
278
+ },
279
+ "deleted_at": {
280
+ "anyOf": [
281
+ {
282
+ "type": "string",
283
+ "format": "date-time",
284
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
285
+ },
286
+ {
287
+ "type": "null"
288
+ }
289
+ ]
290
+ },
291
+ "name": {
292
+ "type": "string"
293
+ },
294
+ "type": {
295
+ "type": "string",
296
+ "enum": [
297
+ "Individual",
298
+ "Company"
299
+ ]
300
+ },
301
+ "status": {
302
+ "type": "string",
303
+ "enum": [
304
+ "ACTIVE",
305
+ "PREVIOUS",
306
+ "UNDESIRABLE",
307
+ "PROSPECTIVE",
308
+ "CREDIT_HOLD"
309
+ ]
310
+ },
311
+ "account_type": {
312
+ "type": "string",
313
+ "enum": [
314
+ "Cash",
315
+ "Account"
316
+ ]
317
+ },
318
+ "billing_email": {
319
+ "type": [
320
+ "string",
321
+ "null"
322
+ ]
323
+ },
324
+ "website": {
325
+ "type": [
326
+ "string",
327
+ "null"
328
+ ]
329
+ },
330
+ "primary_contact_id": {
331
+ "type": [
332
+ "string",
333
+ "null"
334
+ ]
335
+ },
336
+ "credit_balance": {
337
+ "type": "number",
338
+ "description": "Current customer credit balance in dollars."
339
+ },
340
+ "total_revenue": {
341
+ "type": "number",
342
+ "description": "Total recognized customer revenue in dollars."
343
+ },
344
+ "ytd_revenue": {
345
+ "type": "number",
346
+ "description": "Year-to-date recognized customer revenue in dollars."
347
+ },
348
+ "address": {
349
+ "anyOf": [
350
+ {
351
+ "type": "object",
352
+ "properties": {
353
+ "address_line_1": {
354
+ "type": "string"
355
+ },
356
+ "address_line_2": {
357
+ "type": [
358
+ "string",
359
+ "null"
360
+ ]
361
+ },
362
+ "locality": {
363
+ "type": "string"
364
+ },
365
+ "administrative_area": {
366
+ "type": "string"
367
+ },
368
+ "postal_code": {
369
+ "type": [
370
+ "string",
371
+ "null"
372
+ ]
373
+ },
374
+ "country": {
375
+ "type": [
376
+ "string",
377
+ "null"
378
+ ]
379
+ }
380
+ },
381
+ "required": [
382
+ "address_line_1",
383
+ "address_line_2",
384
+ "locality",
385
+ "administrative_area",
386
+ "postal_code",
387
+ "country"
388
+ ]
389
+ },
390
+ {
391
+ "type": "null"
392
+ }
393
+ ]
394
+ }
395
+ },
396
+ "required": [
397
+ "id",
398
+ "created_at",
399
+ "updated_at",
400
+ "is_archived",
401
+ "archived_at",
402
+ "deleted_at",
403
+ "name",
404
+ "type",
405
+ "status",
406
+ "account_type",
407
+ "billing_email",
408
+ "website",
409
+ "primary_contact_id",
410
+ "credit_balance",
411
+ "total_revenue",
412
+ "ytd_revenue",
413
+ "address"
414
+ ]
415
+ }
416
+ },
417
+ "search_orders": {
418
+ "input": {
419
+ "$schema": "http://json-schema.org/draft-07/schema#",
420
+ "type": "object",
421
+ "properties": {
422
+ "page": {
423
+ "default": 0,
424
+ "type": "integer",
425
+ "minimum": 0,
426
+ "maximum": 9007199254740991
427
+ },
428
+ "page_size": {
429
+ "default": 10,
430
+ "type": "integer",
431
+ "minimum": 1,
432
+ "maximum": 50
433
+ },
434
+ "query": {
435
+ "type": "string",
436
+ "minLength": 1,
437
+ "maxLength": 191
438
+ },
439
+ "customer_id": {
440
+ "type": "string",
441
+ "minLength": 12,
442
+ "maxLength": 12
443
+ },
444
+ "status": {
445
+ "type": "string",
446
+ "enum": [
447
+ "Quote",
448
+ "Expired",
449
+ "Reservation",
450
+ "Canceled",
451
+ "Rental",
452
+ "Completed",
453
+ "Closed"
454
+ ]
455
+ },
456
+ "start_time_after": {
457
+ "description": "Return orders with start_time at or after this ISO 8601 datetime.",
458
+ "type": "string",
459
+ "format": "date-time",
460
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
461
+ },
462
+ "start_time_before": {
463
+ "description": "Return orders with start_time at or before this ISO 8601 datetime.",
464
+ "type": "string",
465
+ "format": "date-time",
466
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
467
+ },
468
+ "end_time_after": {
469
+ "description": "Return orders with end_time at or after this ISO 8601 datetime.",
470
+ "type": "string",
471
+ "format": "date-time",
472
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
473
+ },
474
+ "end_time_before": {
475
+ "description": "Return orders with end_time at or before this ISO 8601 datetime.",
476
+ "type": "string",
477
+ "format": "date-time",
478
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
479
+ }
480
+ },
481
+ "additionalProperties": false
482
+ },
483
+ "output": {
484
+ "$schema": "http://json-schema.org/draft-07/schema#",
485
+ "type": "object",
486
+ "properties": {
487
+ "data": {
488
+ "type": "array",
489
+ "items": {
490
+ "type": "object",
491
+ "properties": {
492
+ "id": {
493
+ "type": "string"
494
+ },
495
+ "number": {
496
+ "type": "integer",
497
+ "minimum": -9007199254740991,
498
+ "maximum": 9007199254740991,
499
+ "description": "Sequential order number."
500
+ },
501
+ "source": {
502
+ "type": "string",
503
+ "enum": [
504
+ "Online",
505
+ "Manual"
506
+ ]
507
+ },
508
+ "status": {
509
+ "type": "string",
510
+ "enum": [
511
+ "Quote",
512
+ "Expired",
513
+ "Reservation",
514
+ "Canceled",
515
+ "Rental",
516
+ "Completed",
517
+ "Closed"
518
+ ]
519
+ },
520
+ "customer_id": {
521
+ "type": "string"
522
+ },
523
+ "branch_id": {
524
+ "type": "string",
525
+ "description": "References a branch from /v1/branches."
526
+ },
527
+ "start_time": {
528
+ "type": "string",
529
+ "format": "date-time",
530
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
531
+ },
532
+ "end_time": {
533
+ "anyOf": [
534
+ {
535
+ "type": "string",
536
+ "format": "date-time",
537
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
538
+ },
539
+ {
540
+ "type": "null"
541
+ }
542
+ ]
543
+ },
544
+ "job_number": {
545
+ "type": [
546
+ "string",
547
+ "null"
548
+ ]
549
+ },
550
+ "job_description": {
551
+ "type": [
552
+ "string",
553
+ "null"
554
+ ]
555
+ },
556
+ "po_number": {
557
+ "type": [
558
+ "string",
559
+ "null"
560
+ ]
561
+ },
562
+ "contract_signed_at": {
563
+ "anyOf": [
564
+ {
565
+ "type": "string",
566
+ "format": "date-time",
567
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
568
+ },
569
+ {
570
+ "type": "null"
571
+ }
572
+ ],
573
+ "description": "Creation time of the most recent signed contract, or null when none exists."
574
+ },
575
+ "is_historical": {
576
+ "type": "boolean"
577
+ },
578
+ "items": {
579
+ "type": "array",
580
+ "items": {
581
+ "type": "object",
582
+ "properties": {
583
+ "description": {
584
+ "type": "string"
585
+ },
586
+ "quantity": {
587
+ "type": "number"
588
+ },
589
+ "item_id": {
590
+ "description": "References an inventory item when the line resolves to a single inventory item.",
591
+ "type": [
592
+ "string",
593
+ "null"
594
+ ]
595
+ }
596
+ },
597
+ "required": [
598
+ "description",
599
+ "quantity",
600
+ "item_id"
601
+ ],
602
+ "deprecated": true
603
+ },
604
+ "deprecated": true
605
+ },
606
+ "lines": {
607
+ "type": "array",
608
+ "items": {
609
+ "type": "object",
610
+ "properties": {
611
+ "description": {
612
+ "type": "string"
613
+ },
614
+ "quantity": {
615
+ "type": "number"
616
+ },
617
+ "item_id": {
618
+ "description": "References an inventory item when the line resolves to a single inventory item.",
619
+ "type": [
620
+ "string",
621
+ "null"
622
+ ]
623
+ },
624
+ "id": {
625
+ "type": "string"
626
+ },
627
+ "inventory_on_order_ids": {
628
+ "type": "array",
629
+ "items": {
630
+ "type": "string"
631
+ }
632
+ }
633
+ },
634
+ "required": [
635
+ "description",
636
+ "quantity",
637
+ "item_id",
638
+ "id",
639
+ "inventory_on_order_ids"
640
+ ]
641
+ }
642
+ }
643
+ },
644
+ "required": [
645
+ "id",
646
+ "number",
647
+ "source",
648
+ "status",
649
+ "customer_id",
650
+ "branch_id",
651
+ "start_time",
652
+ "end_time",
653
+ "job_number",
654
+ "job_description",
655
+ "po_number",
656
+ "contract_signed_at",
657
+ "is_historical",
658
+ "items",
659
+ "lines"
660
+ ]
661
+ }
662
+ },
663
+ "pagination": {
664
+ "type": "object",
665
+ "properties": {
666
+ "page": {
667
+ "type": "integer",
668
+ "minimum": -9007199254740991,
669
+ "maximum": 9007199254740991
670
+ },
671
+ "page_size": {
672
+ "type": "integer",
673
+ "minimum": -9007199254740991,
674
+ "maximum": 9007199254740991
675
+ },
676
+ "has_more": {
677
+ "type": "boolean"
678
+ }
679
+ },
680
+ "required": [
681
+ "page",
682
+ "page_size",
683
+ "has_more"
684
+ ]
685
+ }
686
+ },
687
+ "required": [
688
+ "data",
689
+ "pagination"
690
+ ]
691
+ }
692
+ },
693
+ "get_order": {
694
+ "input": {
695
+ "$schema": "http://json-schema.org/draft-07/schema#",
696
+ "type": "object",
697
+ "properties": {
698
+ "id": {
699
+ "type": "string",
700
+ "minLength": 12,
701
+ "maxLength": 12
702
+ }
703
+ },
704
+ "required": [
705
+ "id"
706
+ ],
707
+ "additionalProperties": false
708
+ },
709
+ "output": {
710
+ "type": "object",
711
+ "properties": {
712
+ "id": {
713
+ "type": "string"
714
+ },
715
+ "number": {
716
+ "type": "integer",
717
+ "minimum": -9007199254740991,
718
+ "maximum": 9007199254740991,
719
+ "description": "Sequential order number."
720
+ },
721
+ "source": {
722
+ "type": "string",
723
+ "enum": [
724
+ "Online",
725
+ "Manual"
726
+ ]
727
+ },
728
+ "status": {
729
+ "type": "string",
730
+ "enum": [
731
+ "Quote",
732
+ "Expired",
733
+ "Reservation",
734
+ "Canceled",
735
+ "Rental",
736
+ "Completed",
737
+ "Closed"
738
+ ]
739
+ },
740
+ "customer_id": {
741
+ "type": "string"
742
+ },
743
+ "branch_id": {
744
+ "type": "string",
745
+ "description": "References a branch from /v1/branches."
746
+ },
747
+ "start_time": {
748
+ "type": "string",
749
+ "format": "date-time",
750
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
751
+ },
752
+ "end_time": {
753
+ "anyOf": [
754
+ {
755
+ "type": "string",
756
+ "format": "date-time",
757
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
758
+ },
759
+ {
760
+ "type": "null"
761
+ }
762
+ ]
763
+ },
764
+ "job_number": {
765
+ "type": [
766
+ "string",
767
+ "null"
768
+ ]
769
+ },
770
+ "job_description": {
771
+ "type": [
772
+ "string",
773
+ "null"
774
+ ]
775
+ },
776
+ "po_number": {
777
+ "type": [
778
+ "string",
779
+ "null"
780
+ ]
781
+ },
782
+ "contract_signed_at": {
783
+ "anyOf": [
784
+ {
785
+ "type": "string",
786
+ "format": "date-time",
787
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
788
+ },
789
+ {
790
+ "type": "null"
791
+ }
792
+ ],
793
+ "description": "Creation time of the most recent signed contract, or null when none exists."
794
+ },
795
+ "is_historical": {
796
+ "type": "boolean"
797
+ },
798
+ "items": {
799
+ "type": "array",
800
+ "items": {
801
+ "type": "object",
802
+ "properties": {
803
+ "description": {
804
+ "type": "string"
805
+ },
806
+ "quantity": {
807
+ "type": "number"
808
+ },
809
+ "item_id": {
810
+ "description": "References an inventory item when the line resolves to a single inventory item.",
811
+ "type": [
812
+ "string",
813
+ "null"
814
+ ]
815
+ }
816
+ },
817
+ "required": [
818
+ "description",
819
+ "quantity",
820
+ "item_id"
821
+ ],
822
+ "deprecated": true
823
+ },
824
+ "deprecated": true
825
+ },
826
+ "lines": {
827
+ "type": "array",
828
+ "items": {
829
+ "type": "object",
830
+ "properties": {
831
+ "description": {
832
+ "type": "string"
833
+ },
834
+ "quantity": {
835
+ "type": "number"
836
+ },
837
+ "item_id": {
838
+ "description": "References an inventory item when the line resolves to a single inventory item.",
839
+ "type": [
840
+ "string",
841
+ "null"
842
+ ]
843
+ },
844
+ "id": {
845
+ "type": "string"
846
+ },
847
+ "inventory_on_order_ids": {
848
+ "type": "array",
849
+ "items": {
850
+ "type": "string"
851
+ }
852
+ }
853
+ },
854
+ "required": [
855
+ "description",
856
+ "quantity",
857
+ "item_id",
858
+ "id",
859
+ "inventory_on_order_ids"
860
+ ]
861
+ }
862
+ }
863
+ },
864
+ "required": [
865
+ "id",
866
+ "number",
867
+ "source",
868
+ "status",
869
+ "customer_id",
870
+ "branch_id",
871
+ "start_time",
872
+ "end_time",
873
+ "job_number",
874
+ "job_description",
875
+ "po_number",
876
+ "contract_signed_at",
877
+ "is_historical",
878
+ "items",
879
+ "lines"
880
+ ]
881
+ }
882
+ },
883
+ "list_order_contracts": {
884
+ "input": {
885
+ "$schema": "http://json-schema.org/draft-07/schema#",
886
+ "type": "object",
887
+ "properties": {
888
+ "order_id": {
889
+ "type": "string",
890
+ "minLength": 12,
891
+ "maxLength": 12
892
+ }
893
+ },
894
+ "required": [
895
+ "order_id"
896
+ ],
897
+ "additionalProperties": false
898
+ },
899
+ "output": {
900
+ "$schema": "http://json-schema.org/draft-07/schema#",
901
+ "type": "object",
902
+ "properties": {
903
+ "data": {
904
+ "type": "array",
905
+ "items": {
906
+ "type": "object",
907
+ "properties": {
908
+ "id": {
909
+ "type": "string"
910
+ },
911
+ "created_at": {
912
+ "type": "string",
913
+ "format": "date-time",
914
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
915
+ },
916
+ "signed_by": {
917
+ "type": [
918
+ "string",
919
+ "null"
920
+ ]
921
+ },
922
+ "is_downloadable": {
923
+ "type": "boolean"
924
+ }
925
+ },
926
+ "required": [
927
+ "id",
928
+ "created_at",
929
+ "signed_by",
930
+ "is_downloadable"
931
+ ]
932
+ }
933
+ }
934
+ },
935
+ "required": [
936
+ "data"
937
+ ]
938
+ }
939
+ },
940
+ "search_inventory_on_orders": {
941
+ "input": {
942
+ "$schema": "http://json-schema.org/draft-07/schema#",
943
+ "type": "object",
944
+ "properties": {
945
+ "page": {
946
+ "default": 0,
947
+ "type": "integer",
948
+ "minimum": 0,
949
+ "maximum": 9007199254740991
950
+ },
951
+ "page_size": {
952
+ "default": 10,
953
+ "type": "integer",
954
+ "minimum": 1,
955
+ "maximum": 50
956
+ },
957
+ "order_id": {
958
+ "type": "string",
959
+ "minLength": 12,
960
+ "maxLength": 12
961
+ },
962
+ "work_order_id": {
963
+ "type": "string",
964
+ "minLength": 12,
965
+ "maxLength": 12
966
+ },
967
+ "item_id": {
968
+ "type": "string",
969
+ "minLength": 12,
970
+ "maxLength": 12
971
+ },
972
+ "line_id": {
973
+ "type": "string",
974
+ "minLength": 12,
975
+ "maxLength": 12
976
+ }
977
+ },
978
+ "additionalProperties": false
979
+ },
980
+ "output": {
981
+ "$schema": "http://json-schema.org/draft-07/schema#",
982
+ "type": "object",
983
+ "properties": {
984
+ "data": {
985
+ "type": "array",
986
+ "items": {
987
+ "oneOf": [
988
+ {
989
+ "type": "object",
990
+ "properties": {
991
+ "id": {
992
+ "type": "string"
993
+ },
994
+ "source": {
995
+ "type": "string",
996
+ "enum": [
997
+ "order",
998
+ "work_order"
999
+ ]
1000
+ },
1001
+ "order_id": {
1002
+ "type": [
1003
+ "string",
1004
+ "null"
1005
+ ]
1006
+ },
1007
+ "work_order_id": {
1008
+ "type": [
1009
+ "string",
1010
+ "null"
1011
+ ]
1012
+ },
1013
+ "line_id": {
1014
+ "type": "string"
1015
+ },
1016
+ "item_id": {
1017
+ "type": "string"
1018
+ },
1019
+ "slot_id": {
1020
+ "type": [
1021
+ "string",
1022
+ "null"
1023
+ ]
1024
+ },
1025
+ "description": {
1026
+ "type": "string"
1027
+ },
1028
+ "quantity": {
1029
+ "type": "number"
1030
+ },
1031
+ "status": {
1032
+ "type": "string",
1033
+ "enum": [
1034
+ "Ready",
1035
+ "OnRent",
1036
+ "CalledOff",
1037
+ "PickedUp",
1038
+ "CheckedIn",
1039
+ "Sold"
1040
+ ]
1041
+ },
1042
+ "type": {
1043
+ "type": "string",
1044
+ "const": "rental"
1045
+ },
1046
+ "billing_start_time": {
1047
+ "type": "string",
1048
+ "format": "date-time",
1049
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1050
+ },
1051
+ "billing_end_time": {
1052
+ "anyOf": [
1053
+ {
1054
+ "type": "string",
1055
+ "format": "date-time",
1056
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1057
+ },
1058
+ {
1059
+ "type": "null"
1060
+ }
1061
+ ]
1062
+ }
1063
+ },
1064
+ "required": [
1065
+ "id",
1066
+ "source",
1067
+ "order_id",
1068
+ "work_order_id",
1069
+ "line_id",
1070
+ "item_id",
1071
+ "slot_id",
1072
+ "description",
1073
+ "quantity",
1074
+ "status",
1075
+ "type",
1076
+ "billing_start_time",
1077
+ "billing_end_time"
1078
+ ]
1079
+ },
1080
+ {
1081
+ "type": "object",
1082
+ "properties": {
1083
+ "id": {
1084
+ "type": "string"
1085
+ },
1086
+ "source": {
1087
+ "type": "string",
1088
+ "enum": [
1089
+ "order",
1090
+ "work_order"
1091
+ ]
1092
+ },
1093
+ "order_id": {
1094
+ "type": [
1095
+ "string",
1096
+ "null"
1097
+ ]
1098
+ },
1099
+ "work_order_id": {
1100
+ "type": [
1101
+ "string",
1102
+ "null"
1103
+ ]
1104
+ },
1105
+ "line_id": {
1106
+ "type": "string"
1107
+ },
1108
+ "item_id": {
1109
+ "type": "string"
1110
+ },
1111
+ "slot_id": {
1112
+ "type": [
1113
+ "string",
1114
+ "null"
1115
+ ]
1116
+ },
1117
+ "description": {
1118
+ "type": "string"
1119
+ },
1120
+ "quantity": {
1121
+ "type": "number"
1122
+ },
1123
+ "status": {
1124
+ "type": "string",
1125
+ "enum": [
1126
+ "Ready",
1127
+ "OnRent",
1128
+ "CalledOff",
1129
+ "PickedUp",
1130
+ "CheckedIn",
1131
+ "Sold"
1132
+ ]
1133
+ },
1134
+ "type": {
1135
+ "type": "string",
1136
+ "const": "sale"
1137
+ },
1138
+ "sale_time": {
1139
+ "anyOf": [
1140
+ {
1141
+ "type": "string",
1142
+ "format": "date-time",
1143
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1144
+ },
1145
+ {
1146
+ "type": "null"
1147
+ }
1148
+ ]
1149
+ }
1150
+ },
1151
+ "required": [
1152
+ "id",
1153
+ "source",
1154
+ "order_id",
1155
+ "work_order_id",
1156
+ "line_id",
1157
+ "item_id",
1158
+ "slot_id",
1159
+ "description",
1160
+ "quantity",
1161
+ "status",
1162
+ "type",
1163
+ "sale_time"
1164
+ ]
1165
+ }
1166
+ ]
1167
+ }
1168
+ },
1169
+ "pagination": {
1170
+ "type": "object",
1171
+ "properties": {
1172
+ "page": {
1173
+ "type": "integer",
1174
+ "minimum": -9007199254740991,
1175
+ "maximum": 9007199254740991
1176
+ },
1177
+ "page_size": {
1178
+ "type": "integer",
1179
+ "minimum": -9007199254740991,
1180
+ "maximum": 9007199254740991
1181
+ },
1182
+ "has_more": {
1183
+ "type": "boolean"
1184
+ }
1185
+ },
1186
+ "required": [
1187
+ "page",
1188
+ "page_size",
1189
+ "has_more"
1190
+ ]
1191
+ }
1192
+ },
1193
+ "required": [
1194
+ "data",
1195
+ "pagination"
1196
+ ]
1197
+ }
1198
+ },
1199
+ "get_inventory_on_order": {
1200
+ "input": {
1201
+ "$schema": "http://json-schema.org/draft-07/schema#",
1202
+ "type": "object",
1203
+ "properties": {
1204
+ "id": {
1205
+ "type": "string",
1206
+ "minLength": 12,
1207
+ "maxLength": 12
1208
+ }
1209
+ },
1210
+ "required": [
1211
+ "id"
1212
+ ],
1213
+ "additionalProperties": false
1214
+ },
1215
+ "output": {
1216
+ "oneOf": [
1217
+ {
1218
+ "type": "object",
1219
+ "properties": {
1220
+ "id": {
1221
+ "type": "string"
1222
+ },
1223
+ "source": {
1224
+ "type": "string",
1225
+ "enum": [
1226
+ "order",
1227
+ "work_order"
1228
+ ]
1229
+ },
1230
+ "order_id": {
1231
+ "type": [
1232
+ "string",
1233
+ "null"
1234
+ ]
1235
+ },
1236
+ "work_order_id": {
1237
+ "type": [
1238
+ "string",
1239
+ "null"
1240
+ ]
1241
+ },
1242
+ "line_id": {
1243
+ "type": "string"
1244
+ },
1245
+ "item_id": {
1246
+ "type": "string"
1247
+ },
1248
+ "slot_id": {
1249
+ "type": [
1250
+ "string",
1251
+ "null"
1252
+ ]
1253
+ },
1254
+ "description": {
1255
+ "type": "string"
1256
+ },
1257
+ "quantity": {
1258
+ "type": "number"
1259
+ },
1260
+ "status": {
1261
+ "type": "string",
1262
+ "enum": [
1263
+ "Ready",
1264
+ "OnRent",
1265
+ "CalledOff",
1266
+ "PickedUp",
1267
+ "CheckedIn",
1268
+ "Sold"
1269
+ ]
1270
+ },
1271
+ "type": {
1272
+ "type": "string",
1273
+ "const": "rental"
1274
+ },
1275
+ "billing_start_time": {
1276
+ "type": "string",
1277
+ "format": "date-time",
1278
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1279
+ },
1280
+ "billing_end_time": {
1281
+ "anyOf": [
1282
+ {
1283
+ "type": "string",
1284
+ "format": "date-time",
1285
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1286
+ },
1287
+ {
1288
+ "type": "null"
1289
+ }
1290
+ ]
1291
+ }
1292
+ },
1293
+ "required": [
1294
+ "id",
1295
+ "source",
1296
+ "order_id",
1297
+ "work_order_id",
1298
+ "line_id",
1299
+ "item_id",
1300
+ "slot_id",
1301
+ "description",
1302
+ "quantity",
1303
+ "status",
1304
+ "type",
1305
+ "billing_start_time",
1306
+ "billing_end_time"
1307
+ ]
1308
+ },
1309
+ {
1310
+ "type": "object",
1311
+ "properties": {
1312
+ "id": {
1313
+ "type": "string"
1314
+ },
1315
+ "source": {
1316
+ "type": "string",
1317
+ "enum": [
1318
+ "order",
1319
+ "work_order"
1320
+ ]
1321
+ },
1322
+ "order_id": {
1323
+ "type": [
1324
+ "string",
1325
+ "null"
1326
+ ]
1327
+ },
1328
+ "work_order_id": {
1329
+ "type": [
1330
+ "string",
1331
+ "null"
1332
+ ]
1333
+ },
1334
+ "line_id": {
1335
+ "type": "string"
1336
+ },
1337
+ "item_id": {
1338
+ "type": "string"
1339
+ },
1340
+ "slot_id": {
1341
+ "type": [
1342
+ "string",
1343
+ "null"
1344
+ ]
1345
+ },
1346
+ "description": {
1347
+ "type": "string"
1348
+ },
1349
+ "quantity": {
1350
+ "type": "number"
1351
+ },
1352
+ "status": {
1353
+ "type": "string",
1354
+ "enum": [
1355
+ "Ready",
1356
+ "OnRent",
1357
+ "CalledOff",
1358
+ "PickedUp",
1359
+ "CheckedIn",
1360
+ "Sold"
1361
+ ]
1362
+ },
1363
+ "type": {
1364
+ "type": "string",
1365
+ "const": "sale"
1366
+ },
1367
+ "sale_time": {
1368
+ "anyOf": [
1369
+ {
1370
+ "type": "string",
1371
+ "format": "date-time",
1372
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1373
+ },
1374
+ {
1375
+ "type": "null"
1376
+ }
1377
+ ]
1378
+ }
1379
+ },
1380
+ "required": [
1381
+ "id",
1382
+ "source",
1383
+ "order_id",
1384
+ "work_order_id",
1385
+ "line_id",
1386
+ "item_id",
1387
+ "slot_id",
1388
+ "description",
1389
+ "quantity",
1390
+ "status",
1391
+ "type",
1392
+ "sale_time"
1393
+ ]
1394
+ }
1395
+ ]
1396
+ }
1397
+ },
1398
+ "search_invoices": {
1399
+ "input": {
1400
+ "$schema": "http://json-schema.org/draft-07/schema#",
1401
+ "type": "object",
1402
+ "properties": {
1403
+ "page": {
1404
+ "default": 0,
1405
+ "type": "integer",
1406
+ "minimum": 0,
1407
+ "maximum": 9007199254740991
1408
+ },
1409
+ "page_size": {
1410
+ "default": 10,
1411
+ "type": "integer",
1412
+ "minimum": 1,
1413
+ "maximum": 50
1414
+ },
1415
+ "query": {
1416
+ "type": "string",
1417
+ "minLength": 1,
1418
+ "maxLength": 191
1419
+ },
1420
+ "customer_id": {
1421
+ "type": "string",
1422
+ "minLength": 12,
1423
+ "maxLength": 12
1424
+ },
1425
+ "start_date": {
1426
+ "type": "string",
1427
+ "format": "date-time",
1428
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1429
+ },
1430
+ "end_date": {
1431
+ "type": "string",
1432
+ "format": "date-time",
1433
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1434
+ },
1435
+ "status": {
1436
+ "type": "string",
1437
+ "enum": [
1438
+ "Unpaid",
1439
+ "Paid",
1440
+ "Void",
1441
+ "BadDebt"
1442
+ ]
1443
+ }
1444
+ },
1445
+ "additionalProperties": false
1446
+ },
1447
+ "output": {
1448
+ "$schema": "http://json-schema.org/draft-07/schema#",
1449
+ "type": "object",
1450
+ "properties": {
1451
+ "data": {
1452
+ "type": "array",
1453
+ "items": {
1454
+ "type": "object",
1455
+ "properties": {
1456
+ "id": {
1457
+ "type": "string"
1458
+ },
1459
+ "number": {
1460
+ "type": "string",
1461
+ "description": "Human-facing invoice number."
1462
+ },
1463
+ "status": {
1464
+ "type": "string",
1465
+ "enum": [
1466
+ "Unpaid",
1467
+ "Paid",
1468
+ "Void",
1469
+ "BadDebt"
1470
+ ]
1471
+ },
1472
+ "customer_id": {
1473
+ "type": [
1474
+ "string",
1475
+ "null"
1476
+ ]
1477
+ },
1478
+ "order_id": {
1479
+ "type": [
1480
+ "string",
1481
+ "null"
1482
+ ]
1483
+ },
1484
+ "total_cents": {
1485
+ "type": "integer",
1486
+ "minimum": -9007199254740991,
1487
+ "maximum": 9007199254740991,
1488
+ "description": "Invoice total in integer cents, including tax."
1489
+ },
1490
+ "tax_total_cents": {
1491
+ "type": "integer",
1492
+ "minimum": -9007199254740991,
1493
+ "maximum": 9007199254740991
1494
+ },
1495
+ "paid_cents": {
1496
+ "type": "integer",
1497
+ "minimum": -9007199254740991,
1498
+ "maximum": 9007199254740991,
1499
+ "description": "Net successful payment and refund allocations in integer cents."
1500
+ },
1501
+ "issue_date": {
1502
+ "anyOf": [
1503
+ {
1504
+ "type": "string",
1505
+ "format": "date-time",
1506
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1507
+ },
1508
+ {
1509
+ "type": "null"
1510
+ }
1511
+ ]
1512
+ },
1513
+ "due_date": {
1514
+ "type": "string",
1515
+ "format": "date-time",
1516
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1517
+ },
1518
+ "paid_at": {
1519
+ "anyOf": [
1520
+ {
1521
+ "type": "string",
1522
+ "format": "date-time",
1523
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1524
+ },
1525
+ {
1526
+ "type": "null"
1527
+ }
1528
+ ]
1529
+ },
1530
+ "items": {
1531
+ "type": "array",
1532
+ "items": {
1533
+ "type": "object",
1534
+ "properties": {
1535
+ "description": {
1536
+ "type": "string"
1537
+ },
1538
+ "quantity": {
1539
+ "type": "number"
1540
+ },
1541
+ "total_cents": {
1542
+ "type": "integer",
1543
+ "minimum": -9007199254740991,
1544
+ "maximum": 9007199254740991
1545
+ },
1546
+ "item_id": {
1547
+ "type": [
1548
+ "string",
1549
+ "null"
1550
+ ]
1551
+ }
1552
+ },
1553
+ "required": [
1554
+ "description",
1555
+ "quantity",
1556
+ "total_cents",
1557
+ "item_id"
1558
+ ],
1559
+ "deprecated": true
1560
+ },
1561
+ "deprecated": true
1562
+ },
1563
+ "lines": {
1564
+ "type": "array",
1565
+ "items": {
1566
+ "type": "object",
1567
+ "properties": {
1568
+ "description": {
1569
+ "type": "string"
1570
+ },
1571
+ "quantity": {
1572
+ "type": "number"
1573
+ },
1574
+ "total_cents": {
1575
+ "type": "integer",
1576
+ "minimum": -9007199254740991,
1577
+ "maximum": 9007199254740991
1578
+ },
1579
+ "item_id": {
1580
+ "type": [
1581
+ "string",
1582
+ "null"
1583
+ ]
1584
+ },
1585
+ "id": {
1586
+ "type": "string"
1587
+ },
1588
+ "group_id": {
1589
+ "type": "string"
1590
+ },
1591
+ "sales_tax_cents": {
1592
+ "type": "integer",
1593
+ "minimum": -9007199254740991,
1594
+ "maximum": 9007199254740991
1595
+ },
1596
+ "ledger_account_id": {
1597
+ "type": "string"
1598
+ },
1599
+ "revenue_allocations": {
1600
+ "type": "array",
1601
+ "items": {
1602
+ "type": "object",
1603
+ "properties": {
1604
+ "item_id": {
1605
+ "type": "string"
1606
+ },
1607
+ "ledger_account_id": {
1608
+ "type": "string"
1609
+ },
1610
+ "percentage": {
1611
+ "type": "integer",
1612
+ "minimum": 0,
1613
+ "maximum": 100
1614
+ }
1615
+ },
1616
+ "required": [
1617
+ "item_id",
1618
+ "ledger_account_id",
1619
+ "percentage"
1620
+ ]
1621
+ }
1622
+ }
1623
+ },
1624
+ "required": [
1625
+ "description",
1626
+ "quantity",
1627
+ "total_cents",
1628
+ "item_id",
1629
+ "id",
1630
+ "group_id",
1631
+ "sales_tax_cents",
1632
+ "ledger_account_id",
1633
+ "revenue_allocations"
1634
+ ]
1635
+ }
1636
+ },
1637
+ "payments": {
1638
+ "type": "array",
1639
+ "items": {
1640
+ "type": "object",
1641
+ "properties": {
1642
+ "allocation_id": {
1643
+ "type": "string"
1644
+ },
1645
+ "payment_id": {
1646
+ "type": "string"
1647
+ },
1648
+ "amount_cents": {
1649
+ "type": "integer",
1650
+ "minimum": -9007199254740991,
1651
+ "maximum": 9007199254740991
1652
+ },
1653
+ "allocated_at": {
1654
+ "type": "string",
1655
+ "format": "date-time",
1656
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1657
+ },
1658
+ "type": {
1659
+ "type": "string",
1660
+ "enum": [
1661
+ "Payment",
1662
+ "Refund"
1663
+ ]
1664
+ },
1665
+ "method": {
1666
+ "type": "string",
1667
+ "enum": [
1668
+ "Cash",
1669
+ "Card",
1670
+ "Bank",
1671
+ "Check",
1672
+ "Credit",
1673
+ "Other"
1674
+ ]
1675
+ },
1676
+ "created_at": {
1677
+ "type": "string",
1678
+ "format": "date-time",
1679
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1680
+ },
1681
+ "succeeded_at": {
1682
+ "anyOf": [
1683
+ {
1684
+ "type": "string",
1685
+ "format": "date-time",
1686
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1687
+ },
1688
+ {
1689
+ "type": "null"
1690
+ }
1691
+ ]
1692
+ },
1693
+ "refunded_payment_id": {
1694
+ "type": [
1695
+ "string",
1696
+ "null"
1697
+ ]
1698
+ }
1699
+ },
1700
+ "required": [
1701
+ "allocation_id",
1702
+ "payment_id",
1703
+ "amount_cents",
1704
+ "allocated_at",
1705
+ "type",
1706
+ "method",
1707
+ "created_at",
1708
+ "succeeded_at",
1709
+ "refunded_payment_id"
1710
+ ]
1711
+ }
1712
+ }
1713
+ },
1714
+ "required": [
1715
+ "id",
1716
+ "number",
1717
+ "status",
1718
+ "customer_id",
1719
+ "order_id",
1720
+ "total_cents",
1721
+ "tax_total_cents",
1722
+ "paid_cents",
1723
+ "issue_date",
1724
+ "due_date",
1725
+ "paid_at",
1726
+ "items",
1727
+ "lines",
1728
+ "payments"
1729
+ ]
1730
+ }
1731
+ },
1732
+ "pagination": {
1733
+ "type": "object",
1734
+ "properties": {
1735
+ "page": {
1736
+ "type": "integer",
1737
+ "minimum": -9007199254740991,
1738
+ "maximum": 9007199254740991
1739
+ },
1740
+ "page_size": {
1741
+ "type": "integer",
1742
+ "minimum": -9007199254740991,
1743
+ "maximum": 9007199254740991
1744
+ },
1745
+ "has_more": {
1746
+ "type": "boolean"
1747
+ }
1748
+ },
1749
+ "required": [
1750
+ "page",
1751
+ "page_size",
1752
+ "has_more"
1753
+ ]
1754
+ }
1755
+ },
1756
+ "required": [
1757
+ "data",
1758
+ "pagination"
1759
+ ]
1760
+ }
1761
+ },
1762
+ "get_invoice": {
1763
+ "input": {
1764
+ "$schema": "http://json-schema.org/draft-07/schema#",
1765
+ "type": "object",
1766
+ "properties": {
1767
+ "id": {
1768
+ "type": "string",
1769
+ "minLength": 12,
1770
+ "maxLength": 12
1771
+ }
1772
+ },
1773
+ "required": [
1774
+ "id"
1775
+ ],
1776
+ "additionalProperties": false
1777
+ },
1778
+ "output": {
1779
+ "type": "object",
1780
+ "properties": {
1781
+ "id": {
1782
+ "type": "string"
1783
+ },
1784
+ "number": {
1785
+ "type": "string",
1786
+ "description": "Human-facing invoice number."
1787
+ },
1788
+ "status": {
1789
+ "type": "string",
1790
+ "enum": [
1791
+ "Unpaid",
1792
+ "Paid",
1793
+ "Void",
1794
+ "BadDebt"
1795
+ ]
1796
+ },
1797
+ "customer_id": {
1798
+ "type": [
1799
+ "string",
1800
+ "null"
1801
+ ]
1802
+ },
1803
+ "order_id": {
1804
+ "type": [
1805
+ "string",
1806
+ "null"
1807
+ ]
1808
+ },
1809
+ "total_cents": {
1810
+ "type": "integer",
1811
+ "minimum": -9007199254740991,
1812
+ "maximum": 9007199254740991,
1813
+ "description": "Invoice total in integer cents, including tax."
1814
+ },
1815
+ "tax_total_cents": {
1816
+ "type": "integer",
1817
+ "minimum": -9007199254740991,
1818
+ "maximum": 9007199254740991
1819
+ },
1820
+ "paid_cents": {
1821
+ "type": "integer",
1822
+ "minimum": -9007199254740991,
1823
+ "maximum": 9007199254740991,
1824
+ "description": "Net successful payment and refund allocations in integer cents."
1825
+ },
1826
+ "issue_date": {
1827
+ "anyOf": [
1828
+ {
1829
+ "type": "string",
1830
+ "format": "date-time",
1831
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1832
+ },
1833
+ {
1834
+ "type": "null"
1835
+ }
1836
+ ]
1837
+ },
1838
+ "due_date": {
1839
+ "type": "string",
1840
+ "format": "date-time",
1841
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1842
+ },
1843
+ "paid_at": {
1844
+ "anyOf": [
1845
+ {
1846
+ "type": "string",
1847
+ "format": "date-time",
1848
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1849
+ },
1850
+ {
1851
+ "type": "null"
1852
+ }
1853
+ ]
1854
+ },
1855
+ "items": {
1856
+ "type": "array",
1857
+ "items": {
1858
+ "type": "object",
1859
+ "properties": {
1860
+ "description": {
1861
+ "type": "string"
1862
+ },
1863
+ "quantity": {
1864
+ "type": "number"
1865
+ },
1866
+ "total_cents": {
1867
+ "type": "integer",
1868
+ "minimum": -9007199254740991,
1869
+ "maximum": 9007199254740991
1870
+ },
1871
+ "item_id": {
1872
+ "type": [
1873
+ "string",
1874
+ "null"
1875
+ ]
1876
+ }
1877
+ },
1878
+ "required": [
1879
+ "description",
1880
+ "quantity",
1881
+ "total_cents",
1882
+ "item_id"
1883
+ ],
1884
+ "deprecated": true
1885
+ },
1886
+ "deprecated": true
1887
+ },
1888
+ "lines": {
1889
+ "type": "array",
1890
+ "items": {
1891
+ "type": "object",
1892
+ "properties": {
1893
+ "description": {
1894
+ "type": "string"
1895
+ },
1896
+ "quantity": {
1897
+ "type": "number"
1898
+ },
1899
+ "total_cents": {
1900
+ "type": "integer",
1901
+ "minimum": -9007199254740991,
1902
+ "maximum": 9007199254740991
1903
+ },
1904
+ "item_id": {
1905
+ "type": [
1906
+ "string",
1907
+ "null"
1908
+ ]
1909
+ },
1910
+ "id": {
1911
+ "type": "string"
1912
+ },
1913
+ "group_id": {
1914
+ "type": "string"
1915
+ },
1916
+ "sales_tax_cents": {
1917
+ "type": "integer",
1918
+ "minimum": -9007199254740991,
1919
+ "maximum": 9007199254740991
1920
+ },
1921
+ "ledger_account_id": {
1922
+ "type": "string"
1923
+ },
1924
+ "revenue_allocations": {
1925
+ "type": "array",
1926
+ "items": {
1927
+ "type": "object",
1928
+ "properties": {
1929
+ "item_id": {
1930
+ "type": "string"
1931
+ },
1932
+ "ledger_account_id": {
1933
+ "type": "string"
1934
+ },
1935
+ "percentage": {
1936
+ "type": "integer",
1937
+ "minimum": 0,
1938
+ "maximum": 100
1939
+ }
1940
+ },
1941
+ "required": [
1942
+ "item_id",
1943
+ "ledger_account_id",
1944
+ "percentage"
1945
+ ]
1946
+ }
1947
+ }
1948
+ },
1949
+ "required": [
1950
+ "description",
1951
+ "quantity",
1952
+ "total_cents",
1953
+ "item_id",
1954
+ "id",
1955
+ "group_id",
1956
+ "sales_tax_cents",
1957
+ "ledger_account_id",
1958
+ "revenue_allocations"
1959
+ ]
1960
+ }
1961
+ },
1962
+ "payments": {
1963
+ "type": "array",
1964
+ "items": {
1965
+ "type": "object",
1966
+ "properties": {
1967
+ "allocation_id": {
1968
+ "type": "string"
1969
+ },
1970
+ "payment_id": {
1971
+ "type": "string"
1972
+ },
1973
+ "amount_cents": {
1974
+ "type": "integer",
1975
+ "minimum": -9007199254740991,
1976
+ "maximum": 9007199254740991
1977
+ },
1978
+ "allocated_at": {
1979
+ "type": "string",
1980
+ "format": "date-time",
1981
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
1982
+ },
1983
+ "type": {
1984
+ "type": "string",
1985
+ "enum": [
1986
+ "Payment",
1987
+ "Refund"
1988
+ ]
1989
+ },
1990
+ "method": {
1991
+ "type": "string",
1992
+ "enum": [
1993
+ "Cash",
1994
+ "Card",
1995
+ "Bank",
1996
+ "Check",
1997
+ "Credit",
1998
+ "Other"
1999
+ ]
2000
+ },
2001
+ "created_at": {
2002
+ "type": "string",
2003
+ "format": "date-time",
2004
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2005
+ },
2006
+ "succeeded_at": {
2007
+ "anyOf": [
2008
+ {
2009
+ "type": "string",
2010
+ "format": "date-time",
2011
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2012
+ },
2013
+ {
2014
+ "type": "null"
2015
+ }
2016
+ ]
2017
+ },
2018
+ "refunded_payment_id": {
2019
+ "type": [
2020
+ "string",
2021
+ "null"
2022
+ ]
2023
+ }
2024
+ },
2025
+ "required": [
2026
+ "allocation_id",
2027
+ "payment_id",
2028
+ "amount_cents",
2029
+ "allocated_at",
2030
+ "type",
2031
+ "method",
2032
+ "created_at",
2033
+ "succeeded_at",
2034
+ "refunded_payment_id"
2035
+ ]
2036
+ }
2037
+ }
2038
+ },
2039
+ "required": [
2040
+ "id",
2041
+ "number",
2042
+ "status",
2043
+ "customer_id",
2044
+ "order_id",
2045
+ "total_cents",
2046
+ "tax_total_cents",
2047
+ "paid_cents",
2048
+ "issue_date",
2049
+ "due_date",
2050
+ "paid_at",
2051
+ "items",
2052
+ "lines",
2053
+ "payments"
2054
+ ]
2055
+ }
2056
+ },
2057
+ "search_payments": {
2058
+ "input": {
2059
+ "$schema": "http://json-schema.org/draft-07/schema#",
2060
+ "type": "object",
2061
+ "properties": {
2062
+ "page": {
2063
+ "default": 0,
2064
+ "type": "integer",
2065
+ "minimum": 0,
2066
+ "maximum": 9007199254740991
2067
+ },
2068
+ "page_size": {
2069
+ "default": 10,
2070
+ "type": "integer",
2071
+ "minimum": 1,
2072
+ "maximum": 50
2073
+ },
2074
+ "query": {
2075
+ "type": "string",
2076
+ "minLength": 1,
2077
+ "maxLength": 191
2078
+ },
2079
+ "customer_id": {
2080
+ "type": "string",
2081
+ "minLength": 12,
2082
+ "maxLength": 12
2083
+ },
2084
+ "start_date": {
2085
+ "type": "string",
2086
+ "format": "date-time",
2087
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2088
+ },
2089
+ "end_date": {
2090
+ "type": "string",
2091
+ "format": "date-time",
2092
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2093
+ },
2094
+ "invoice_id": {
2095
+ "type": "string",
2096
+ "minLength": 12,
2097
+ "maxLength": 12
2098
+ },
2099
+ "order_id": {
2100
+ "type": "string",
2101
+ "minLength": 12,
2102
+ "maxLength": 12
2103
+ },
2104
+ "branch_id": {
2105
+ "type": "string",
2106
+ "minLength": 12,
2107
+ "maxLength": 12
2108
+ },
2109
+ "type": {
2110
+ "type": "string",
2111
+ "enum": [
2112
+ "Payment",
2113
+ "Refund"
2114
+ ]
2115
+ },
2116
+ "method": {
2117
+ "type": "string",
2118
+ "enum": [
2119
+ "Cash",
2120
+ "Card",
2121
+ "Bank",
2122
+ "Check",
2123
+ "Credit",
2124
+ "Other"
2125
+ ]
2126
+ }
2127
+ },
2128
+ "additionalProperties": false
2129
+ },
2130
+ "output": {
2131
+ "$schema": "http://json-schema.org/draft-07/schema#",
2132
+ "type": "object",
2133
+ "properties": {
2134
+ "data": {
2135
+ "type": "array",
2136
+ "items": {
2137
+ "type": "object",
2138
+ "properties": {
2139
+ "id": {
2140
+ "type": "string"
2141
+ },
2142
+ "type": {
2143
+ "type": "string",
2144
+ "enum": [
2145
+ "Payment",
2146
+ "Refund"
2147
+ ]
2148
+ },
2149
+ "method": {
2150
+ "type": "string",
2151
+ "enum": [
2152
+ "Cash",
2153
+ "Card",
2154
+ "Bank",
2155
+ "Check",
2156
+ "Credit",
2157
+ "Other"
2158
+ ]
2159
+ },
2160
+ "amount_cents": {
2161
+ "type": "integer",
2162
+ "minimum": -9007199254740991,
2163
+ "maximum": 9007199254740991
2164
+ },
2165
+ "customer_id": {
2166
+ "type": [
2167
+ "string",
2168
+ "null"
2169
+ ]
2170
+ },
2171
+ "branch_id": {
2172
+ "type": "string"
2173
+ },
2174
+ "order_id": {
2175
+ "type": [
2176
+ "string",
2177
+ "null"
2178
+ ]
2179
+ },
2180
+ "refunded_payment_id": {
2181
+ "type": [
2182
+ "string",
2183
+ "null"
2184
+ ]
2185
+ },
2186
+ "created_at": {
2187
+ "type": "string",
2188
+ "format": "date-time",
2189
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2190
+ },
2191
+ "succeeded_at": {
2192
+ "anyOf": [
2193
+ {
2194
+ "type": "string",
2195
+ "format": "date-time",
2196
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2197
+ },
2198
+ {
2199
+ "type": "null"
2200
+ }
2201
+ ]
2202
+ },
2203
+ "allocations": {
2204
+ "type": "array",
2205
+ "items": {
2206
+ "type": "object",
2207
+ "properties": {
2208
+ "id": {
2209
+ "type": "string"
2210
+ },
2211
+ "invoice_id": {
2212
+ "type": "string"
2213
+ },
2214
+ "amount_cents": {
2215
+ "type": "integer",
2216
+ "minimum": -9007199254740991,
2217
+ "maximum": 9007199254740991
2218
+ },
2219
+ "created_at": {
2220
+ "type": "string",
2221
+ "format": "date-time",
2222
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2223
+ }
2224
+ },
2225
+ "required": [
2226
+ "id",
2227
+ "invoice_id",
2228
+ "amount_cents",
2229
+ "created_at"
2230
+ ]
2231
+ }
2232
+ }
2233
+ },
2234
+ "required": [
2235
+ "id",
2236
+ "type",
2237
+ "method",
2238
+ "amount_cents",
2239
+ "customer_id",
2240
+ "branch_id",
2241
+ "order_id",
2242
+ "refunded_payment_id",
2243
+ "created_at",
2244
+ "succeeded_at",
2245
+ "allocations"
2246
+ ]
2247
+ }
2248
+ },
2249
+ "pagination": {
2250
+ "type": "object",
2251
+ "properties": {
2252
+ "page": {
2253
+ "type": "integer",
2254
+ "minimum": -9007199254740991,
2255
+ "maximum": 9007199254740991
2256
+ },
2257
+ "page_size": {
2258
+ "type": "integer",
2259
+ "minimum": -9007199254740991,
2260
+ "maximum": 9007199254740991
2261
+ },
2262
+ "has_more": {
2263
+ "type": "boolean"
2264
+ }
2265
+ },
2266
+ "required": [
2267
+ "page",
2268
+ "page_size",
2269
+ "has_more"
2270
+ ]
2271
+ }
2272
+ },
2273
+ "required": [
2274
+ "data",
2275
+ "pagination"
2276
+ ]
2277
+ }
2278
+ },
2279
+ "get_payment": {
2280
+ "input": {
2281
+ "$schema": "http://json-schema.org/draft-07/schema#",
2282
+ "type": "object",
2283
+ "properties": {
2284
+ "id": {
2285
+ "type": "string",
2286
+ "minLength": 12,
2287
+ "maxLength": 12
2288
+ }
2289
+ },
2290
+ "required": [
2291
+ "id"
2292
+ ],
2293
+ "additionalProperties": false
2294
+ },
2295
+ "output": {
2296
+ "type": "object",
2297
+ "properties": {
2298
+ "id": {
2299
+ "type": "string"
2300
+ },
2301
+ "type": {
2302
+ "type": "string",
2303
+ "enum": [
2304
+ "Payment",
2305
+ "Refund"
2306
+ ]
2307
+ },
2308
+ "method": {
2309
+ "type": "string",
2310
+ "enum": [
2311
+ "Cash",
2312
+ "Card",
2313
+ "Bank",
2314
+ "Check",
2315
+ "Credit",
2316
+ "Other"
2317
+ ]
2318
+ },
2319
+ "amount_cents": {
2320
+ "type": "integer",
2321
+ "minimum": -9007199254740991,
2322
+ "maximum": 9007199254740991
2323
+ },
2324
+ "customer_id": {
2325
+ "type": [
2326
+ "string",
2327
+ "null"
2328
+ ]
2329
+ },
2330
+ "branch_id": {
2331
+ "type": "string"
2332
+ },
2333
+ "order_id": {
2334
+ "type": [
2335
+ "string",
2336
+ "null"
2337
+ ]
2338
+ },
2339
+ "refunded_payment_id": {
2340
+ "type": [
2341
+ "string",
2342
+ "null"
2343
+ ]
2344
+ },
2345
+ "created_at": {
2346
+ "type": "string",
2347
+ "format": "date-time",
2348
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2349
+ },
2350
+ "succeeded_at": {
2351
+ "anyOf": [
2352
+ {
2353
+ "type": "string",
2354
+ "format": "date-time",
2355
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2356
+ },
2357
+ {
2358
+ "type": "null"
2359
+ }
2360
+ ]
2361
+ },
2362
+ "allocations": {
2363
+ "type": "array",
2364
+ "items": {
2365
+ "type": "object",
2366
+ "properties": {
2367
+ "id": {
2368
+ "type": "string"
2369
+ },
2370
+ "invoice_id": {
2371
+ "type": "string"
2372
+ },
2373
+ "amount_cents": {
2374
+ "type": "integer",
2375
+ "minimum": -9007199254740991,
2376
+ "maximum": 9007199254740991
2377
+ },
2378
+ "created_at": {
2379
+ "type": "string",
2380
+ "format": "date-time",
2381
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2382
+ }
2383
+ },
2384
+ "required": [
2385
+ "id",
2386
+ "invoice_id",
2387
+ "amount_cents",
2388
+ "created_at"
2389
+ ]
2390
+ }
2391
+ }
2392
+ },
2393
+ "required": [
2394
+ "id",
2395
+ "type",
2396
+ "method",
2397
+ "amount_cents",
2398
+ "customer_id",
2399
+ "branch_id",
2400
+ "order_id",
2401
+ "refunded_payment_id",
2402
+ "created_at",
2403
+ "succeeded_at",
2404
+ "allocations"
2405
+ ]
2406
+ }
2407
+ },
2408
+ "search_inventory_items": {
2409
+ "input": {
2410
+ "$schema": "http://json-schema.org/draft-07/schema#",
2411
+ "type": "object",
2412
+ "properties": {
2413
+ "page": {
2414
+ "default": 0,
2415
+ "type": "integer",
2416
+ "minimum": 0,
2417
+ "maximum": 9007199254740991
2418
+ },
2419
+ "page_size": {
2420
+ "default": 10,
2421
+ "type": "integer",
2422
+ "minimum": 1,
2423
+ "maximum": 50
2424
+ },
2425
+ "query": {
2426
+ "type": "string",
2427
+ "minLength": 1,
2428
+ "maxLength": 191
2429
+ },
2430
+ "kind": {
2431
+ "type": "string",
2432
+ "enum": [
2433
+ "Actual",
2434
+ "Slot"
2435
+ ]
2436
+ }
2437
+ },
2438
+ "additionalProperties": false
2439
+ },
2440
+ "output": {
2441
+ "$schema": "http://json-schema.org/draft-07/schema#",
2442
+ "type": "object",
2443
+ "properties": {
2444
+ "data": {
2445
+ "type": "array",
2446
+ "items": {
2447
+ "type": "object",
2448
+ "properties": {
2449
+ "id": {
2450
+ "type": "string"
2451
+ },
2452
+ "updated_at": {
2453
+ "type": "string",
2454
+ "format": "date-time",
2455
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2456
+ },
2457
+ "kind": {
2458
+ "type": "string",
2459
+ "enum": [
2460
+ "Actual",
2461
+ "Slot"
2462
+ ]
2463
+ },
2464
+ "type": {
2465
+ "type": "string",
2466
+ "enum": [
2467
+ "Serial",
2468
+ "Sale",
2469
+ "Bulk",
2470
+ "Part"
2471
+ ]
2472
+ },
2473
+ "make": {
2474
+ "type": [
2475
+ "string",
2476
+ "null"
2477
+ ]
2478
+ },
2479
+ "model": {
2480
+ "type": [
2481
+ "string",
2482
+ "null"
2483
+ ]
2484
+ },
2485
+ "model_year": {
2486
+ "anyOf": [
2487
+ {
2488
+ "type": "integer",
2489
+ "minimum": -9007199254740991,
2490
+ "maximum": 9007199254740991
2491
+ },
2492
+ {
2493
+ "type": "null"
2494
+ }
2495
+ ]
2496
+ },
2497
+ "condition": {
2498
+ "anyOf": [
2499
+ {
2500
+ "type": "string",
2501
+ "enum": [
2502
+ "Excellent",
2503
+ "Good",
2504
+ "Ok",
2505
+ "Bad",
2506
+ "Terrible"
2507
+ ]
2508
+ },
2509
+ {
2510
+ "type": "null"
2511
+ }
2512
+ ]
2513
+ },
2514
+ "item_number": {
2515
+ "type": [
2516
+ "string",
2517
+ "null"
2518
+ ]
2519
+ },
2520
+ "part_number": {
2521
+ "type": [
2522
+ "string",
2523
+ "null"
2524
+ ]
2525
+ },
2526
+ "serial_number": {
2527
+ "type": [
2528
+ "string",
2529
+ "null"
2530
+ ]
2531
+ },
2532
+ "description": {
2533
+ "type": "string"
2534
+ },
2535
+ "category": {
2536
+ "type": "string"
2537
+ },
2538
+ "class": {
2539
+ "type": "string"
2540
+ },
2541
+ "group": {
2542
+ "type": "string"
2543
+ }
2544
+ },
2545
+ "required": [
2546
+ "id",
2547
+ "updated_at",
2548
+ "kind",
2549
+ "type",
2550
+ "make",
2551
+ "model",
2552
+ "model_year",
2553
+ "condition",
2554
+ "item_number",
2555
+ "part_number",
2556
+ "serial_number",
2557
+ "description",
2558
+ "category",
2559
+ "class",
2560
+ "group"
2561
+ ]
2562
+ }
2563
+ },
2564
+ "pagination": {
2565
+ "type": "object",
2566
+ "properties": {
2567
+ "page": {
2568
+ "type": "integer",
2569
+ "minimum": -9007199254740991,
2570
+ "maximum": 9007199254740991
2571
+ },
2572
+ "page_size": {
2573
+ "type": "integer",
2574
+ "minimum": -9007199254740991,
2575
+ "maximum": 9007199254740991
2576
+ },
2577
+ "has_more": {
2578
+ "type": "boolean"
2579
+ }
2580
+ },
2581
+ "required": [
2582
+ "page",
2583
+ "page_size",
2584
+ "has_more"
2585
+ ]
2586
+ }
2587
+ },
2588
+ "required": [
2589
+ "data",
2590
+ "pagination"
2591
+ ]
2592
+ }
2593
+ },
2594
+ "get_inventory_item": {
2595
+ "input": {
2596
+ "$schema": "http://json-schema.org/draft-07/schema#",
2597
+ "type": "object",
2598
+ "properties": {
2599
+ "id": {
2600
+ "type": "string",
2601
+ "minLength": 12,
2602
+ "maxLength": 12
2603
+ }
2604
+ },
2605
+ "required": [
2606
+ "id"
2607
+ ],
2608
+ "additionalProperties": false
2609
+ },
2610
+ "output": {
2611
+ "type": "object",
2612
+ "properties": {
2613
+ "id": {
2614
+ "type": "string"
2615
+ },
2616
+ "updated_at": {
2617
+ "type": "string",
2618
+ "format": "date-time",
2619
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
2620
+ },
2621
+ "kind": {
2622
+ "type": "string",
2623
+ "enum": [
2624
+ "Actual",
2625
+ "Slot"
2626
+ ]
2627
+ },
2628
+ "type": {
2629
+ "type": "string",
2630
+ "enum": [
2631
+ "Serial",
2632
+ "Sale",
2633
+ "Bulk",
2634
+ "Part"
2635
+ ]
2636
+ },
2637
+ "make": {
2638
+ "type": [
2639
+ "string",
2640
+ "null"
2641
+ ]
2642
+ },
2643
+ "model": {
2644
+ "type": [
2645
+ "string",
2646
+ "null"
2647
+ ]
2648
+ },
2649
+ "model_year": {
2650
+ "anyOf": [
2651
+ {
2652
+ "type": "integer",
2653
+ "minimum": -9007199254740991,
2654
+ "maximum": 9007199254740991
2655
+ },
2656
+ {
2657
+ "type": "null"
2658
+ }
2659
+ ]
2660
+ },
2661
+ "condition": {
2662
+ "anyOf": [
2663
+ {
2664
+ "type": "string",
2665
+ "enum": [
2666
+ "Excellent",
2667
+ "Good",
2668
+ "Ok",
2669
+ "Bad",
2670
+ "Terrible"
2671
+ ]
2672
+ },
2673
+ {
2674
+ "type": "null"
2675
+ }
2676
+ ]
2677
+ },
2678
+ "item_number": {
2679
+ "type": [
2680
+ "string",
2681
+ "null"
2682
+ ]
2683
+ },
2684
+ "part_number": {
2685
+ "type": [
2686
+ "string",
2687
+ "null"
2688
+ ]
2689
+ },
2690
+ "serial_number": {
2691
+ "type": [
2692
+ "string",
2693
+ "null"
2694
+ ]
2695
+ },
2696
+ "description": {
2697
+ "type": "string"
2698
+ },
2699
+ "category": {
2700
+ "type": "string"
2701
+ },
2702
+ "class": {
2703
+ "type": "string"
2704
+ },
2705
+ "group": {
2706
+ "type": "string"
2707
+ }
2708
+ },
2709
+ "required": [
2710
+ "id",
2711
+ "updated_at",
2712
+ "kind",
2713
+ "type",
2714
+ "make",
2715
+ "model",
2716
+ "model_year",
2717
+ "condition",
2718
+ "item_number",
2719
+ "part_number",
2720
+ "serial_number",
2721
+ "description",
2722
+ "category",
2723
+ "class",
2724
+ "group"
2725
+ ]
2726
+ }
2727
+ }
2728
+ };