@epilot/pricing-client 1.12.2 → 1.13.1

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,2130 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Pricing API",
5
+ "description": "This API hub sets the foundations for the following Pricing APIs:\n- Order API, used to manage orders in Epilot 360:\n - Pricing features such as automatic calculation of totals and price breakdowns for taxes\n - Product and pricing data validation\n- Shopping Cart API, used to interact with a cart during a customer's checkout session, and it's responsible for providing the following set of features:\n - A unified data model to model a Shopping Cart\n - Cart abandonment recovery\n - Product and pricing data validation\n - Checkout a cart into an order, invoice, or quote\n\n- Product Catalog API, provides a way to query the entire catalog of products and prices.\n - Exposes querying operations to access the customer Product Catalog\n\n- Product Availability Service, provides a way to check for products availability by a set of predefined dimensions.\n",
6
+ "contact": {
7
+ "name": "Maintainers Channel",
8
+ "url": "https://epilot.slack.com/archives/C020B4URQNS"
9
+ },
10
+ "version": "1.0.0"
11
+ },
12
+ "externalDocs": {
13
+ "description": "Read the full docs here",
14
+ "url": "https://e-pilot.atlassian.net/wiki/spaces/EO/pages/5459705918/Shopping+Cart+Orders+API"
15
+ },
16
+ "tags": [
17
+ {
18
+ "name": "Order",
19
+ "description": "Order Management"
20
+ },
21
+ {
22
+ "name": "Cart",
23
+ "description": "The shopping cart & checkout management operations"
24
+ },
25
+ {
26
+ "name": "Product Catalog",
27
+ "description": "Product querying operations"
28
+ }
29
+ ],
30
+ "security": [
31
+ {
32
+ "EpilotAuth": []
33
+ }
34
+ ],
35
+ "paths": {
36
+ "/v1/order": {
37
+ "post": {
38
+ "description": "Create an order",
39
+ "operationId": "createOrder",
40
+ "summary": "createOrder",
41
+ "tags": [
42
+ "Order"
43
+ ],
44
+ "requestBody": {
45
+ "required": true,
46
+ "content": {
47
+ "application/json": {
48
+ "schema": {
49
+ "$ref": "#/components/schemas/OrderPayload"
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "responses": {
55
+ "201": {
56
+ "description": "Order result",
57
+ "content": {
58
+ "application/json": {
59
+ "schema": {
60
+ "$ref": "#/components/schemas/Order"
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "400": {
66
+ "description": "Invalid payload",
67
+ "content": {
68
+ "application/json": {
69
+ "schema": {
70
+ "$ref": "#/components/schemas/Error"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "/v1/order/{id}": {
79
+ "put": {
80
+ "description": "Update an existing Order",
81
+ "operationId": "putOrder",
82
+ "summary": "putOrder",
83
+ "tags": [
84
+ "Order"
85
+ ],
86
+ "parameters": [
87
+ {
88
+ "in": "path",
89
+ "name": "id",
90
+ "description": "Order entity ID",
91
+ "schema": {
92
+ "type": "string"
93
+ },
94
+ "required": true,
95
+ "example": "1ec8518f-7538-48f7-8297-44f120d3e5cd"
96
+ }
97
+ ],
98
+ "requestBody": {
99
+ "required": true,
100
+ "content": {
101
+ "application/json": {
102
+ "schema": {
103
+ "$ref": "#/components/schemas/OrderPayload"
104
+ }
105
+ }
106
+ }
107
+ },
108
+ "responses": {
109
+ "200": {
110
+ "description": "Order result",
111
+ "content": {
112
+ "application/json": {
113
+ "schema": {
114
+ "$ref": "#/components/schemas/Order"
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "400": {
120
+ "description": "Invalid payload",
121
+ "content": {
122
+ "application/json": {
123
+ "schema": {
124
+ "$ref": "#/components/schemas/Error"
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "/v1/public/cart:checkout": {
133
+ "post": {
134
+ "description": "Checkouts a cart and executes the specified checkout `mode` process.\n\nA Checkout implicitly finalizes the provided cart (if not transient from a fast-checkout) and behaves in one of the following modes:\n- `create_order` (**default**): the payment happens at a later date or managed by 3rd-party CRM (SAP)\n- `create_invoice`: the payment happens on the online checkout (paypal, stripe, adyen)\n- `create_quote`: the checkout represents a price quote request\n\nFast checkout is also supported, by passing the Cart contents directly.\nWhen a fast checkout is performed the cart is considered transient and there is no cart persistance.\n\nIf the checkout `mode` is omitted, the `mode` will default to `create_order`.\n",
135
+ "operationId": "$checkoutCart",
136
+ "summary": "checkoutCart",
137
+ "security": [],
138
+ "tags": [
139
+ "Cart"
140
+ ],
141
+ "parameters": [
142
+ {
143
+ "in": "header",
144
+ "name": "X-Ivy-Org-ID",
145
+ "description": "The target Organization Id represented by the caller",
146
+ "schema": {
147
+ "type": "string"
148
+ },
149
+ "required": true
150
+ }
151
+ ],
152
+ "requestBody": {
153
+ "required": true,
154
+ "content": {
155
+ "application/json": {
156
+ "schema": {
157
+ "$ref": "#/components/schemas/CheckoutCart"
158
+ },
159
+ "examples": {
160
+ "Checkout with a CartID": {
161
+ "$ref": "#/components/examples/checkoutWithCartId"
162
+ },
163
+ "Fast Checkout with a transient Cart": {
164
+ "$ref": "#/components/examples/checkoutWithTransientCart"
165
+ }
166
+ }
167
+ }
168
+ }
169
+ },
170
+ "responses": {
171
+ "200": {
172
+ "description": "The checkout result",
173
+ "content": {
174
+ "application/json": {
175
+ "schema": {
176
+ "$ref": "#/components/schemas/CheckoutCartResult"
177
+ },
178
+ "examples": {
179
+ "Checkout with created order": {
180
+ "$ref": "#/components/examples/checkoutResult"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "400": {
187
+ "description": "Invalid payload",
188
+ "content": {
189
+ "application/json": {
190
+ "schema": {
191
+ "$ref": "#/components/schemas/Error"
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "/v1/public/catalog": {
200
+ "post": {
201
+ "description": "Provides a querying functionalities over products and prices of the Catalog for a given organization.",
202
+ "operationId": "$searchCatalog",
203
+ "summary": "searchCatalog",
204
+ "security": [],
205
+ "tags": [
206
+ "Product Catalog"
207
+ ],
208
+ "parameters": [
209
+ {
210
+ "in": "header",
211
+ "name": "X-Ivy-Org-ID",
212
+ "description": "The target Organization Id represented by the caller",
213
+ "schema": {
214
+ "type": "string"
215
+ },
216
+ "required": true
217
+ }
218
+ ],
219
+ "requestBody": {
220
+ "required": true,
221
+ "content": {
222
+ "application/json": {
223
+ "schema": {
224
+ "$ref": "#/components/schemas/CatalogSearch"
225
+ }
226
+ }
227
+ }
228
+ },
229
+ "responses": {
230
+ "200": {
231
+ "description": "The search result",
232
+ "content": {
233
+ "application/json": {
234
+ "schema": {
235
+ "$ref": "#/components/schemas/CatalogSearchResult"
236
+ }
237
+ }
238
+ }
239
+ },
240
+ "400": {
241
+ "description": "Invalid payload",
242
+ "content": {
243
+ "application/json": {
244
+ "schema": {
245
+ "$ref": "#/components/schemas/Error"
246
+ }
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ },
253
+ "/v1/public/availability:check": {
254
+ "post": {
255
+ "description": "The availability check endpoint",
256
+ "operationId": "$availabilityCheck",
257
+ "summary": "availabilityCheck",
258
+ "security": [],
259
+ "tags": [
260
+ "Product Catalog"
261
+ ],
262
+ "parameters": [
263
+ {
264
+ "in": "header",
265
+ "name": "X-Ivy-Org-ID",
266
+ "description": "The target Organization Id represented by the caller",
267
+ "schema": {
268
+ "type": "string"
269
+ },
270
+ "required": true
271
+ }
272
+ ],
273
+ "requestBody": {
274
+ "required": true,
275
+ "content": {
276
+ "application/json": {
277
+ "schema": {
278
+ "$ref": "#/components/schemas/AvailabilityCheckParams"
279
+ },
280
+ "examples": {
281
+ "Check availability with location dimension": {
282
+ "value": {
283
+ "products": [
284
+ "cd75456a-30e4-4912-95be-e743d5ea175b"
285
+ ],
286
+ "filters": {
287
+ "location": {
288
+ "postal_code": "57008",
289
+ "city": "Cologne",
290
+ "street": "Media Park",
291
+ "street_number": "8a"
292
+ }
293
+ }
294
+ }
295
+ },
296
+ "Check availability with location & available date dimension": {
297
+ "value": {
298
+ "products": [
299
+ "cd75456a-30e4-4912-95be-e743d5ea175b"
300
+ ],
301
+ "filters": {
302
+ "location": {
303
+ "postal_code": "57008",
304
+ "city": "Cologne",
305
+ "street": "Media Park",
306
+ "street_number": "8a"
307
+ },
308
+ "available_date": "2022-05-01"
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "responses": {
317
+ "200": {
318
+ "description": "The availability check result",
319
+ "content": {
320
+ "application/json": {
321
+ "schema": {
322
+ "$ref": "#/components/schemas/AvailabilityResult"
323
+ },
324
+ "examples": {
325
+ "Response with available products": {
326
+ "value": {
327
+ "available_products": [
328
+ "cd75456a-30e4-4912-95be-e743d5ea175b"
329
+ ],
330
+ "check_results": [
331
+ {
332
+ "product_id": "cd75456a-30e4-4912-95be-e743d5ea175b",
333
+ "matching_hits": 1
334
+ }
335
+ ]
336
+ }
337
+ },
338
+ "Response with no available products": {
339
+ "value": {
340
+ "available_products": []
341
+ }
342
+ },
343
+ "Response with available and unavailable products": {
344
+ "value": {
345
+ "availableProducts": [
346
+ "my-product-id-123-2"
347
+ ],
348
+ "checkResults": [
349
+ {
350
+ "productId": "my-product-id-123-1",
351
+ "matchingError": {
352
+ "msg": "Error - Unknown file extension for availability file."
353
+ }
354
+ },
355
+ {
356
+ "matchingHits": 1,
357
+ "productId": "my-product-id-123-2"
358
+ }
359
+ ]
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+ },
366
+ "400": {
367
+ "description": "Invalid payload",
368
+ "content": {
369
+ "application/json": {
370
+ "schema": {
371
+ "$ref": "#/components/schemas/Error"
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+ }
378
+ },
379
+ "/v1/public/opportunity": {
380
+ "post": {
381
+ "deprecated": true,
382
+ "description": "This API is Deprecated. Please use the Entity API or Submission API to create opportunities. Creates a new opportunity. During the creation of an opportunity, an unique customer-readable `opportunity_number` will be generated.\nThe `opportunity_number` can be used to universally identify an opportunity within epilot platform.\n",
383
+ "operationId": "$createOpportunity",
384
+ "summary": "createOpportunity",
385
+ "security": [],
386
+ "parameters": [
387
+ {
388
+ "in": "header",
389
+ "name": "X-Ivy-Org-ID",
390
+ "description": "The target Organization Id represented by the caller",
391
+ "schema": {
392
+ "type": "string"
393
+ },
394
+ "required": true
395
+ }
396
+ ],
397
+ "requestBody": {
398
+ "required": true,
399
+ "content": {
400
+ "application/json": {
401
+ "schema": {
402
+ "$ref": "#/components/schemas/Opportunity"
403
+ },
404
+ "examples": {
405
+ "Opportunity containing one Order": {
406
+ "value": {
407
+ "billing_address": {
408
+ "street": "sdf",
409
+ "street_number": "1",
410
+ "city": "Berlin",
411
+ "postal_code": "12045",
412
+ "country": "de",
413
+ "additional_info": "adasd"
414
+ },
415
+ "delivery_address": {
416
+ "street": "sdf",
417
+ "street_number": "1",
418
+ "city": "Berlin",
419
+ "postal_code": "12045",
420
+ "country": "de",
421
+ "additional_info": "adasd"
422
+ },
423
+ "items": {
424
+ "$relation": [
425
+ {
426
+ "entity_id": "c8dbe8f3-28b6-4d77-aae8-47bc24a2532f",
427
+ "_tags": [
428
+ "journey"
429
+ ]
430
+ }
431
+ ]
432
+ },
433
+ "_tags": [
434
+ "journey",
435
+ "ORWNr4iCN"
436
+ ]
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ },
443
+ "responses": {
444
+ "201": {
445
+ "description": "The new Opportunity.",
446
+ "content": {
447
+ "application/json": {
448
+ "schema": {
449
+ "$ref": "#/components/schemas/Opportunity"
450
+ }
451
+ }
452
+ }
453
+ },
454
+ "400": {
455
+ "description": "Invalid payload",
456
+ "content": {
457
+ "application/json": {
458
+ "schema": {
459
+ "$ref": "#/components/schemas/Error"
460
+ }
461
+ }
462
+ }
463
+ }
464
+ }
465
+ }
466
+ }
467
+ },
468
+ "components": {
469
+ "securitySchemes": {
470
+ "EpilotAuth": {
471
+ "type": "http",
472
+ "scheme": "bearer",
473
+ "description": "Epilot Bearer Token"
474
+ }
475
+ },
476
+ "schemas": {
477
+ "Error": {
478
+ "required": [
479
+ "message"
480
+ ],
481
+ "properties": {
482
+ "message": {
483
+ "type": "string",
484
+ "description": "Error message"
485
+ }
486
+ }
487
+ },
488
+ "MetaData": {
489
+ "description": "A set of key-value pairs.",
490
+ "type": "array",
491
+ "items": {
492
+ "oneOf": [
493
+ {
494
+ "type": "object",
495
+ "description": "Key value pair entry",
496
+ "properties": {
497
+ "key": {
498
+ "type": "string",
499
+ "description": "Item key"
500
+ },
501
+ "value": {
502
+ "type": "string",
503
+ "description": "Item value"
504
+ }
505
+ }
506
+ }
507
+ ]
508
+ }
509
+ },
510
+ "CatalogSearch": {
511
+ "description": "A catalog search payload",
512
+ "type": "object",
513
+ "properties": {
514
+ "q": {
515
+ "description": "The query to perform using lucene query syntax.",
516
+ "type": "string"
517
+ },
518
+ "sort": {
519
+ "description": "The sort expression to sort the results.",
520
+ "type": "string"
521
+ },
522
+ "from": {
523
+ "description": "The index from which to query, used for pagination purposes. Defaults to 0",
524
+ "type": "number"
525
+ },
526
+ "size": {
527
+ "description": "The max size of the response, defaults to 2000.",
528
+ "type": "number"
529
+ },
530
+ "hydrate": {
531
+ "type": "boolean",
532
+ "description": "When true, enables entity hydration to resolve nested $relation references in-place.",
533
+ "default": false
534
+ },
535
+ "availability": {
536
+ "$ref": "#/components/schemas/AvailabilityFilters"
537
+ }
538
+ },
539
+ "example": {
540
+ "q": "_id:1233432 OR _id:123432454 OR _id:23445433",
541
+ "sort": "description ASC",
542
+ "from": 0,
543
+ "size": 200,
544
+ "availability": {
545
+ "location": {
546
+ "postal_code": "57008,",
547
+ "city": "Cologne,",
548
+ "street": "Media Park,",
549
+ "street_number": "8a"
550
+ },
551
+ "available_date": {
552
+ "value": "2022-05-01"
553
+ }
554
+ }
555
+ },
556
+ "required": [
557
+ "q"
558
+ ]
559
+ },
560
+ "CatalogSearchResult": {
561
+ "description": "The query result payload",
562
+ "type": "object",
563
+ "properties": {
564
+ "hits": {
565
+ "type": "number",
566
+ "description": "The number os results returned."
567
+ },
568
+ "results": {
569
+ "type": "array",
570
+ "items": {
571
+ "anyOf": [
572
+ {
573
+ "$ref": "#/components/schemas/Product"
574
+ },
575
+ {
576
+ "$ref": "#/components/schemas/Price"
577
+ }
578
+ ]
579
+ }
580
+ }
581
+ },
582
+ "example": {
583
+ "hits": 2,
584
+ "results": [
585
+ {
586
+ "schema": "product",
587
+ "description": "product a"
588
+ },
589
+ {
590
+ "schema": "price",
591
+ "unit_amount_decimal": "124.342343434"
592
+ }
593
+ ]
594
+ }
595
+ },
596
+ "AvailabilityCheckParams": {
597
+ "description": "Availability check request payload",
598
+ "type": "object",
599
+ "properties": {
600
+ "products": {
601
+ "description": "Products to check availability",
602
+ "type": "array",
603
+ "items": {
604
+ "type": "string",
605
+ "description": "Product under availability check"
606
+ }
607
+ },
608
+ "filters": {
609
+ "$ref": "#/components/schemas/AvailabilityFilters"
610
+ }
611
+ },
612
+ "required": [
613
+ "products",
614
+ "filters"
615
+ ]
616
+ },
617
+ "AvailabilityResult": {
618
+ "description": "The availability check result payload",
619
+ "type": "object",
620
+ "properties": {
621
+ "available_products": {
622
+ "type": "array",
623
+ "items": {
624
+ "type": "string",
625
+ "description": "Available Products"
626
+ }
627
+ },
628
+ "check_results": {
629
+ "description": "The check result details",
630
+ "type": "array",
631
+ "items": {
632
+ "type": "object",
633
+ "properties": {
634
+ "product_id": {
635
+ "type": "string"
636
+ },
637
+ "matching_hits": {
638
+ "description": "The number of rules matched",
639
+ "type": "number"
640
+ },
641
+ "matching_error": {
642
+ "description": "A set of matching errors when checking availability",
643
+ "type": "object",
644
+ "additionalProperties": true
645
+ }
646
+ },
647
+ "required": [
648
+ "product_id"
649
+ ]
650
+ }
651
+ }
652
+ },
653
+ "required": [
654
+ "available_products"
655
+ ],
656
+ "example": {
657
+ "available_products": [],
658
+ "check_results": [
659
+ {
660
+ "product_id": "my-product-id-123-1",
661
+ "matching_hits": 0
662
+ },
663
+ {
664
+ "product_id": "my-product-id-123-2",
665
+ "matching_hits": 0
666
+ }
667
+ ]
668
+ }
669
+ },
670
+ "CartDto": {
671
+ "description": "A valid cart payload from a client.",
672
+ "properties": {
673
+ "metadata": {
674
+ "$ref": "#/components/schemas/MetaData"
675
+ },
676
+ "customer": {
677
+ "$ref": "#/components/schemas/Customer"
678
+ },
679
+ "billing_address": {
680
+ "$ref": "#/components/schemas/Address"
681
+ },
682
+ "delivery_address": {
683
+ "$ref": "#/components/schemas/Address"
684
+ },
685
+ "source_type": {
686
+ "type": "string",
687
+ "description": "type of source, e.g. journey or manual",
688
+ "example": "journey"
689
+ },
690
+ "source_id": {
691
+ "type": "string",
692
+ "description": "identifier for source e.g. journey ID",
693
+ "example": "ce99875f-fba9-4fe2-a8f9-afaf52059051"
694
+ },
695
+ "source": {
696
+ "$ref": "#/components/schemas/OrderSource"
697
+ },
698
+ "additional_addresses": {
699
+ "type": "array",
700
+ "items": {
701
+ "$ref": "#/components/schemas/Address"
702
+ }
703
+ },
704
+ "payment_method": {
705
+ "$ref": "#/components/schemas/PaymentMethod"
706
+ },
707
+ "line_items": {
708
+ "$ref": "#/components/schemas/PriceItemsDto"
709
+ },
710
+ "files": {
711
+ "type": "array",
712
+ "description": "An array of file IDs, already upload into the File API, that are related with this cart",
713
+ "items": {
714
+ "type": "string",
715
+ "description": "a string representing a file ID as received from the File API"
716
+ }
717
+ },
718
+ "status": {
719
+ "$ref": "#/components/schemas/OrderStatus"
720
+ },
721
+ "tags": {
722
+ "type": "array",
723
+ "items": {
724
+ "type": "string"
725
+ }
726
+ },
727
+ "journey_data": {
728
+ "type": "object",
729
+ "additionalProperties": true
730
+ },
731
+ "consents": {
732
+ "type": "object",
733
+ "additionalProperties": true
734
+ }
735
+ },
736
+ "required": [
737
+ "line_items"
738
+ ]
739
+ },
740
+ "CheckoutCart": {
741
+ "type": "object",
742
+ "description": "The cart checkout request payload",
743
+ "properties": {
744
+ "cart": {
745
+ "anyOf": [
746
+ {
747
+ "description": "the cart id",
748
+ "type": "string"
749
+ },
750
+ {
751
+ "$ref": "#/components/schemas/CartDto"
752
+ }
753
+ ]
754
+ },
755
+ "mode": {
756
+ "$ref": "#/components/schemas/CheckoutMode"
757
+ }
758
+ }
759
+ },
760
+ "CheckoutCartResult": {
761
+ "type": "object",
762
+ "description": "The cart checkout result",
763
+ "properties": {
764
+ "order": {
765
+ "$ref": "#/components/schemas/Order"
766
+ }
767
+ }
768
+ },
769
+ "CheckoutMode": {
770
+ "type": "string",
771
+ "description": "The checkout mode for the cart checkout.",
772
+ "enum": [
773
+ "create_order",
774
+ "create_invoice",
775
+ "create_quote"
776
+ ]
777
+ },
778
+ "OrderStatus": {
779
+ "type": "string",
780
+ "enum": [
781
+ "draft",
782
+ "quote",
783
+ "placed",
784
+ "cancelled",
785
+ "completed"
786
+ ],
787
+ "description": "The order status"
788
+ },
789
+ "PriceItemsDto": {
790
+ "description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
791
+ "type": "array",
792
+ "items": {
793
+ "oneOf": [
794
+ {
795
+ "$ref": "#/components/schemas/PriceItemDto"
796
+ }
797
+ ]
798
+ }
799
+ },
800
+ "PriceItemDto": {
801
+ "description": "Represents a valid price item from a client.",
802
+ "type": "object",
803
+ "properties": {
804
+ "metadata": {
805
+ "$ref": "#/components/schemas/MetaData"
806
+ },
807
+ "quantity": {
808
+ "type": "integer",
809
+ "description": "The quantity of products being purchased."
810
+ },
811
+ "description": {
812
+ "type": "string",
813
+ "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
814
+ },
815
+ "product_id": {
816
+ "type": "string",
817
+ "description": "The id of the product."
818
+ },
819
+ "price_id": {
820
+ "type": "string",
821
+ "description": "The id of the price."
822
+ },
823
+ "taxes": {
824
+ "type": "array",
825
+ "description": "The taxes applied to the price item.",
826
+ "readOnly": true,
827
+ "items": {
828
+ "oneOf": [
829
+ {
830
+ "$ref": "#/components/schemas/TaxAmountDto"
831
+ }
832
+ ]
833
+ }
834
+ },
835
+ "recurrences": {
836
+ "type": "array",
837
+ "description": "The taxes applied to the price item.",
838
+ "readOnly": true,
839
+ "items": {
840
+ "oneOf": [
841
+ {
842
+ "$ref": "#/components/schemas/RecurrenceAmountDto"
843
+ }
844
+ ]
845
+ }
846
+ },
847
+ "_price": {
848
+ "$ref": "#/components/schemas/Price"
849
+ },
850
+ "_product": {
851
+ "description": "The product linked to the price item.",
852
+ "$ref": "#/components/schemas/Product"
853
+ }
854
+ }
855
+ },
856
+ "TaxAmountDto": {
857
+ "type": "object",
858
+ "description": "A valid tax rate from a client.",
859
+ "properties": {
860
+ "rate": {
861
+ "type": "string",
862
+ "description": "The tax rate applied."
863
+ },
864
+ "tax": {
865
+ "description": "The tax applied.",
866
+ "oneOf": [
867
+ {
868
+ "$ref": "#/components/schemas/Tax"
869
+ }
870
+ ]
871
+ }
872
+ }
873
+ },
874
+ "OrderSource": {
875
+ "type": "object",
876
+ "description": "Order Source",
877
+ "properties": {
878
+ "http": {
879
+ "type": "string",
880
+ "description": "Link path for the source",
881
+ "example": "/app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939"
882
+ },
883
+ "title": {
884
+ "type": "string",
885
+ "description": "Title for the source",
886
+ "example": "Journey: PH Journey"
887
+ }
888
+ }
889
+ },
890
+ "OpportunitySource": {
891
+ "type": "object",
892
+ "description": "Order Source",
893
+ "properties": {
894
+ "http": {
895
+ "type": "string",
896
+ "description": "Link path for the source",
897
+ "example": "/app/v2/journey-builder/editor/db7f6940-994b-11ec-a46d-9f1824ff2939"
898
+ },
899
+ "title": {
900
+ "type": "string",
901
+ "description": "Title for the source",
902
+ "example": "Journey: PH Journey"
903
+ }
904
+ }
905
+ },
906
+ "RecurrenceAmountDto": {
907
+ "type": "object",
908
+ "description": "An amount associated with a specific recurrence.",
909
+ "properties": {
910
+ "type": {
911
+ "type": "string",
912
+ "description": "The price type."
913
+ },
914
+ "billing_period": {
915
+ "type": "string",
916
+ "description": "The price billing period."
917
+ },
918
+ "amount_subtotal": {
919
+ "type": "integer",
920
+ "description": "Total of all items, with same recurrence, before (discounts or) taxes are applied."
921
+ },
922
+ "amount_total": {
923
+ "type": "integer",
924
+ "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
925
+ },
926
+ "amount_tax": {
927
+ "type": "integer",
928
+ "description": "Total of all items taxes, with same recurrence."
929
+ }
930
+ },
931
+ "required": [
932
+ "type",
933
+ "amount_subtotal",
934
+ "amount_total"
935
+ ]
936
+ },
937
+ "Cart": {
938
+ "description": "Supports shopping for products and services until ready for checkout.",
939
+ "properties": {
940
+ "id": {
941
+ "type": "string",
942
+ "description": "The cart identifier"
943
+ },
944
+ "org_id": {
945
+ "type": "string",
946
+ "description": "The user's Organization Id the cart belongs to",
947
+ "readOnly": true
948
+ },
949
+ "status": {
950
+ "enum": [
951
+ "open",
952
+ "complete",
953
+ "expired"
954
+ ],
955
+ "type": "string",
956
+ "readOnly": true,
957
+ "description": "The status of the Cart:\n- open - the cart checkout is still in progress. Payment processing has not started\n- complete - the cart checkout is complete. Payment processing may still be in progress\n- expired - the cart checkout has expired. No further processing will occur\n"
958
+ },
959
+ "customer": {
960
+ "$ref": "#/components/schemas/Customer"
961
+ },
962
+ "billing_address": {
963
+ "$ref": "#/components/schemas/Address"
964
+ },
965
+ "delivery_address": {
966
+ "$ref": "#/components/schemas/Address"
967
+ },
968
+ "metadata": {
969
+ "$ref": "#/components/schemas/MetaData"
970
+ },
971
+ "line_items": {
972
+ "$ref": "#/components/schemas/PriceItems"
973
+ },
974
+ "amount_subtotal": {
975
+ "readOnly": true,
976
+ "type": "integer",
977
+ "description": "Total of all items before (discounts or) taxes are applied."
978
+ },
979
+ "amount_total": {
980
+ "readOnly": true,
981
+ "type": "integer",
982
+ "description": "Total of all items after (discounts and) taxes are applied."
983
+ },
984
+ "total_details": {
985
+ "$ref": "#/components/schemas/TotalDetails"
986
+ },
987
+ "created_at": {
988
+ "readOnly": true,
989
+ "type": "string",
990
+ "format": "date-time"
991
+ },
992
+ "updated_at": {
993
+ "readOnly": true,
994
+ "type": "string",
995
+ "format": "date-time"
996
+ }
997
+ }
998
+ },
999
+ "Currency": {
1000
+ "type": "string",
1001
+ "description": "Three-letter ISO currency code, in lowercase. Must be a supported currency.\nISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html\n",
1002
+ "example": "EUR"
1003
+ },
1004
+ "Opportunity": {
1005
+ "type": "object",
1006
+ "description": "The opportunity entity",
1007
+ "additionalProperties": true,
1008
+ "properties": {
1009
+ "opportunity_number": {
1010
+ "type": "string",
1011
+ "description": "The opportunity id number for the customer (autogenerated if left blank)"
1012
+ },
1013
+ "description": {
1014
+ "type": "string",
1015
+ "description": "A description to frame this opportunity within its sales process"
1016
+ },
1017
+ "status": {
1018
+ "type": "string",
1019
+ "description": "The opportunity status",
1020
+ "enum": [
1021
+ "lead",
1022
+ "qualification",
1023
+ "validation",
1024
+ "offering",
1025
+ "supply",
1026
+ "approval",
1027
+ "operations",
1028
+ "complete"
1029
+ ]
1030
+ },
1031
+ "items": {
1032
+ "oneOf": [
1033
+ {
1034
+ "type": "array",
1035
+ "description": "An array of order when the opportunity entity is hydrated",
1036
+ "items": {
1037
+ "$ref": "#/components/schemas/Order"
1038
+ }
1039
+ },
1040
+ {
1041
+ "type": "object",
1042
+ "description": "The order relations items, representing quotes or orders associated with the opportunity",
1043
+ "properties": {
1044
+ "$relation": {
1045
+ "type": "array",
1046
+ "items": {
1047
+ "$ref": "#/components/schemas/OrderRelation"
1048
+ }
1049
+ }
1050
+ }
1051
+ }
1052
+ ]
1053
+ },
1054
+ "_org_id": {
1055
+ "type": "string",
1056
+ "description": "Organization Id the order belongs to"
1057
+ },
1058
+ "_id": {
1059
+ "type": "string",
1060
+ "readOnly": true
1061
+ },
1062
+ "_created_at": {
1063
+ "type": "string",
1064
+ "readOnly": true
1065
+ },
1066
+ "_updated_at": {
1067
+ "type": "string",
1068
+ "readOnly": true
1069
+ },
1070
+ "source_type": {
1071
+ "type": "string",
1072
+ "description": "type of source, e.g. journey or manual",
1073
+ "example": "journey"
1074
+ },
1075
+ "source_id": {
1076
+ "type": "string",
1077
+ "description": "identifier for source e.g. journey ID",
1078
+ "example": "ce99875f-fba9-4fe2-a8f9-afaf52059051"
1079
+ },
1080
+ "source": {
1081
+ "$ref": "#/components/schemas/OpportunitySource"
1082
+ },
1083
+ "_tags": {
1084
+ "type": "array",
1085
+ "items": {
1086
+ "type": "string"
1087
+ }
1088
+ }
1089
+ }
1090
+ },
1091
+ "OrderRelation": {
1092
+ "type": "object",
1093
+ "description": "An order relation reference",
1094
+ "properties": {
1095
+ "entity_id": {
1096
+ "type": "string",
1097
+ "description": "The relation order id"
1098
+ },
1099
+ "_tags": {
1100
+ "type": "array",
1101
+ "items": {
1102
+ "type": "string",
1103
+ "description": "The tags array associated with the relation"
1104
+ }
1105
+ }
1106
+ }
1107
+ },
1108
+ "OrderPayload": {
1109
+ "type": "object",
1110
+ "description": "Order Entity Payload",
1111
+ "properties": {
1112
+ "status": {
1113
+ "$ref": "#/components/schemas/OrderStatus"
1114
+ },
1115
+ "line_items": {
1116
+ "$ref": "#/components/schemas/PriceItems"
1117
+ },
1118
+ "source_type": {
1119
+ "type": "string",
1120
+ "description": "type of source, e.g. journey or manual",
1121
+ "example": "journey"
1122
+ },
1123
+ "currency": {
1124
+ "$ref": "#/components/schemas/Currency"
1125
+ },
1126
+ "contact": {
1127
+ "readOnly": true,
1128
+ "type": "string",
1129
+ "description": "The id of an existing contact."
1130
+ },
1131
+ "billing_first_name": {
1132
+ "type": "string"
1133
+ },
1134
+ "billing_last_name": {
1135
+ "type": "string"
1136
+ },
1137
+ "billing_company_name": {
1138
+ "type": "string"
1139
+ },
1140
+ "billing_vat": {
1141
+ "type": "string"
1142
+ },
1143
+ "billing_email": {
1144
+ "type": "string"
1145
+ },
1146
+ "billing_phone": {
1147
+ "type": "string"
1148
+ },
1149
+ "billing_address": {
1150
+ "type": "array",
1151
+ "items": {
1152
+ "$ref": "#/components/schemas/Address"
1153
+ }
1154
+ },
1155
+ "delivery_address": {
1156
+ "type": "array",
1157
+ "items": {
1158
+ "$ref": "#/components/schemas/Address"
1159
+ }
1160
+ },
1161
+ "payment_method": {
1162
+ "type": "array",
1163
+ "items": {
1164
+ "$ref": "#/components/schemas/PaymentMethod"
1165
+ }
1166
+ },
1167
+ "_tags": {
1168
+ "type": "array",
1169
+ "items": {
1170
+ "type": "string"
1171
+ }
1172
+ }
1173
+ }
1174
+ },
1175
+ "Order": {
1176
+ "type": "object",
1177
+ "description": "The order entity",
1178
+ "additionalProperties": true,
1179
+ "properties": {
1180
+ "order_number": {
1181
+ "type": "string",
1182
+ "description": "The order id number for the customer"
1183
+ },
1184
+ "cart_id": {
1185
+ "type": "string",
1186
+ "description": "The cart id that originated or is associated with the order"
1187
+ },
1188
+ "status": {
1189
+ "$ref": "#/components/schemas/OrderStatus"
1190
+ },
1191
+ "source_type": {
1192
+ "type": "string",
1193
+ "description": "type of source, e.g. journey or manual",
1194
+ "example": "journey"
1195
+ },
1196
+ "source_id": {
1197
+ "type": "string",
1198
+ "description": "identifier for source e.g. journey ID",
1199
+ "example": "ce99875f-fba9-4fe2-a8f9-afaf52059051"
1200
+ },
1201
+ "source": {
1202
+ "$ref": "#/components/schemas/OrderSource"
1203
+ },
1204
+ "metadata": {
1205
+ "$ref": "#/components/schemas/MetaData"
1206
+ },
1207
+ "billing_first_name": {
1208
+ "type": "string"
1209
+ },
1210
+ "billing_last_name": {
1211
+ "type": "string"
1212
+ },
1213
+ "billing_company_name": {
1214
+ "type": "string"
1215
+ },
1216
+ "billing_vat": {
1217
+ "type": "string"
1218
+ },
1219
+ "billing_email": {
1220
+ "type": "string"
1221
+ },
1222
+ "billing_phone": {
1223
+ "type": "string"
1224
+ },
1225
+ "billing_address": {
1226
+ "type": "array",
1227
+ "items": {
1228
+ "$ref": "#/components/schemas/Address"
1229
+ }
1230
+ },
1231
+ "currency": {
1232
+ "$ref": "#/components/schemas/Currency"
1233
+ },
1234
+ "delivery_address": {
1235
+ "type": "array",
1236
+ "items": {
1237
+ "$ref": "#/components/schemas/Address"
1238
+ }
1239
+ },
1240
+ "payment_method": {
1241
+ "type": "array",
1242
+ "items": {
1243
+ "$ref": "#/components/schemas/PaymentMethod"
1244
+ }
1245
+ },
1246
+ "contact": {
1247
+ "readOnly": true,
1248
+ "type": "string",
1249
+ "description": "The id of an existing contact."
1250
+ },
1251
+ "line_items": {
1252
+ "$ref": "#/components/schemas/PriceItems"
1253
+ },
1254
+ "amount_subtotal": {
1255
+ "readOnly": true,
1256
+ "type": "integer",
1257
+ "description": "Total of all items before (discounts or) taxes are applied."
1258
+ },
1259
+ "amount_total": {
1260
+ "readOnly": true,
1261
+ "type": "integer",
1262
+ "description": "Total of all items after (discounts and) taxes are applied."
1263
+ },
1264
+ "total_details": {
1265
+ "$ref": "#/components/schemas/TotalDetails"
1266
+ },
1267
+ "_org_id": {
1268
+ "type": "string",
1269
+ "description": "Organization Id the order belongs to"
1270
+ },
1271
+ "_id": {
1272
+ "type": "string",
1273
+ "readOnly": true
1274
+ },
1275
+ "_created_at": {
1276
+ "type": "string",
1277
+ "readOnly": true
1278
+ },
1279
+ "_updated_at": {
1280
+ "type": "string",
1281
+ "readOnly": true
1282
+ },
1283
+ "_tags": {
1284
+ "type": "array",
1285
+ "items": {
1286
+ "type": "string"
1287
+ }
1288
+ }
1289
+ }
1290
+ },
1291
+ "PriceItems": {
1292
+ "description": "Tracks a set of product prices, quantities, (discounts) and taxes.",
1293
+ "type": "array",
1294
+ "items": {
1295
+ "oneOf": [
1296
+ {
1297
+ "$ref": "#/components/schemas/PriceItem"
1298
+ }
1299
+ ]
1300
+ }
1301
+ },
1302
+ "PriceItem": {
1303
+ "description": "Represents a price item",
1304
+ "type": "object",
1305
+ "properties": {
1306
+ "id": {
1307
+ "type": "string",
1308
+ "description": "price item id",
1309
+ "readOnly": true
1310
+ },
1311
+ "metadata": {
1312
+ "$ref": "#/components/schemas/MetaData"
1313
+ },
1314
+ "unit_amount": {
1315
+ "type": "integer",
1316
+ "description": "The unit amount value",
1317
+ "readOnly": true
1318
+ },
1319
+ "amount_subtotal": {
1320
+ "type": "integer",
1321
+ "description": "Total before any (discounts or) taxes are applied.",
1322
+ "readOnly": true
1323
+ },
1324
+ "unit_amount_net": {
1325
+ "type": "integer",
1326
+ "description": "Net unit amount without taxes.",
1327
+ "readOnly": true
1328
+ },
1329
+ "amount_total": {
1330
+ "type": "integer",
1331
+ "description": "Total after (discounts and) taxes.",
1332
+ "readOnly": true
1333
+ },
1334
+ "currency": {
1335
+ "$ref": "#/components/schemas/Currency"
1336
+ },
1337
+ "description": {
1338
+ "type": "string",
1339
+ "description": "An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."
1340
+ },
1341
+ "quantity": {
1342
+ "type": "integer",
1343
+ "description": "The quantity of products being purchased."
1344
+ },
1345
+ "product_id": {
1346
+ "type": "string",
1347
+ "description": "The id of the product."
1348
+ },
1349
+ "price_id": {
1350
+ "type": "string",
1351
+ "description": "The id of the price."
1352
+ },
1353
+ "_price": {
1354
+ "$ref": "#/components/schemas/Price"
1355
+ },
1356
+ "_product": {
1357
+ "$ref": "#/components/schemas/Product"
1358
+ },
1359
+ "taxes": {
1360
+ "type": "array",
1361
+ "description": "The taxes applied to the price item.",
1362
+ "readOnly": true,
1363
+ "items": {
1364
+ "oneOf": [
1365
+ {
1366
+ "$ref": "#/components/schemas/TaxAmount"
1367
+ }
1368
+ ]
1369
+ }
1370
+ },
1371
+ "recurrences": {
1372
+ "type": "array",
1373
+ "description": "The sum of amounts of the price items by recurrence.",
1374
+ "readOnly": true,
1375
+ "items": {
1376
+ "oneOf": [
1377
+ {
1378
+ "$ref": "#/components/schemas/RecurrenceAmount"
1379
+ }
1380
+ ]
1381
+ }
1382
+ }
1383
+ }
1384
+ },
1385
+ "TaxAmount": {
1386
+ "type": "object",
1387
+ "description": "A tax amount associated with a specific tax rate.",
1388
+ "readOnly": true,
1389
+ "properties": {
1390
+ "amount": {
1391
+ "type": "integer",
1392
+ "description": "The tax amount."
1393
+ },
1394
+ "rate": {
1395
+ "type": "string",
1396
+ "description": "The tax rate applied."
1397
+ },
1398
+ "tax": {
1399
+ "description": "The tax applied.",
1400
+ "oneOf": [
1401
+ {
1402
+ "$ref": "#/components/schemas/Tax"
1403
+ }
1404
+ ]
1405
+ }
1406
+ }
1407
+ },
1408
+ "RecurrenceAmount": {
1409
+ "type": "object",
1410
+ "description": "An amount associated with a specific recurrence.",
1411
+ "readOnly": true,
1412
+ "properties": {
1413
+ "type": {
1414
+ "type": "string",
1415
+ "description": "The price type."
1416
+ },
1417
+ "billing_period": {
1418
+ "type": "string",
1419
+ "description": "The price billing period."
1420
+ },
1421
+ "amount_subtotal": {
1422
+ "type": "integer",
1423
+ "description": "Total of all items, with same recurrence, before (discounts or) taxes are applied."
1424
+ },
1425
+ "amount_total": {
1426
+ "type": "integer",
1427
+ "description": "Total of all items, with same recurrence, after (discounts and) taxes are applied."
1428
+ },
1429
+ "amount_tax": {
1430
+ "type": "integer",
1431
+ "description": "Total of all items taxes, with same recurrence."
1432
+ }
1433
+ },
1434
+ "required": [
1435
+ "type",
1436
+ "amount_subtotal",
1437
+ "amount_total"
1438
+ ]
1439
+ },
1440
+ "TotalDetails": {
1441
+ "type": "object",
1442
+ "description": "The total details with tax (and discount) aggregated totals.",
1443
+ "readOnly": true,
1444
+ "properties": {
1445
+ "amount_shipping": {
1446
+ "type": "integer",
1447
+ "description": "This is the sum of all the price item shipping amounts."
1448
+ },
1449
+ "amount_tax": {
1450
+ "type": "integer",
1451
+ "description": "This is the sum of all the price item tax amounts."
1452
+ },
1453
+ "breakdown": {
1454
+ "type": "object",
1455
+ "description": "Breakdown of individual tax (and discount) amounts that add up to the totals.",
1456
+ "properties": {
1457
+ "taxes": {
1458
+ "type": "array",
1459
+ "description": "The aggregated price items tax amount per rate.",
1460
+ "items": {
1461
+ "oneOf": [
1462
+ {
1463
+ "$ref": "#/components/schemas/TaxAmount"
1464
+ }
1465
+ ]
1466
+ }
1467
+ },
1468
+ "recurrences": {
1469
+ "type": "array",
1470
+ "description": "The aggregated price items tax amount per rate.",
1471
+ "items": {
1472
+ "oneOf": [
1473
+ {
1474
+ "$ref": "#/components/schemas/RecurrenceAmount"
1475
+ }
1476
+ ]
1477
+ }
1478
+ }
1479
+ }
1480
+ }
1481
+ }
1482
+ },
1483
+ "PricingDetails": {
1484
+ "type": "object",
1485
+ "description": "The result from the calculation of a set of price items.",
1486
+ "properties": {
1487
+ "items": {
1488
+ "type": "array",
1489
+ "items": {
1490
+ "oneOf": [
1491
+ {
1492
+ "$ref": "#/components/schemas/PriceItem"
1493
+ }
1494
+ ]
1495
+ }
1496
+ },
1497
+ "amount_subtotal": {
1498
+ "type": "integer",
1499
+ "description": "Total of all items before (discounts or) taxes are applied."
1500
+ },
1501
+ "amount_total": {
1502
+ "type": "integer",
1503
+ "description": "Total of all items after (discounts and) taxes are applied."
1504
+ },
1505
+ "total_details": {
1506
+ "$ref": "#/components/schemas/TotalDetails"
1507
+ }
1508
+ }
1509
+ },
1510
+ "BillingPeriod": {
1511
+ "type": "string",
1512
+ "enum": [
1513
+ "weekly",
1514
+ "monthly",
1515
+ "every_quarter",
1516
+ "every_6_months",
1517
+ "yearly",
1518
+ "one_time"
1519
+ ]
1520
+ },
1521
+ "SalesTax": {
1522
+ "type": "string",
1523
+ "enum": [
1524
+ "nontaxable",
1525
+ "reduced",
1526
+ "standard"
1527
+ ]
1528
+ },
1529
+ "Price": {
1530
+ "type": "object",
1531
+ "description": "The price configuration",
1532
+ "additionalProperties": true,
1533
+ "readOnly": true,
1534
+ "properties": {
1535
+ "active": {
1536
+ "type": "boolean"
1537
+ },
1538
+ "billing_scheme": {
1539
+ "type": "string",
1540
+ "enum": [
1541
+ "Per Unit"
1542
+ ]
1543
+ },
1544
+ "description": {
1545
+ "type": "string"
1546
+ },
1547
+ "sales_tax": {
1548
+ "$ref": "#/components/schemas/SalesTax"
1549
+ },
1550
+ "tax_behavior": {
1551
+ "type": "string",
1552
+ "enum": [
1553
+ "inclusive",
1554
+ "exclusive"
1555
+ ]
1556
+ },
1557
+ "tiers_mode": {
1558
+ "type": "string",
1559
+ "enum": [
1560
+ "Standard"
1561
+ ]
1562
+ },
1563
+ "type": {
1564
+ "type": "string",
1565
+ "enum": [
1566
+ "one_time",
1567
+ "recurring"
1568
+ ]
1569
+ },
1570
+ "billing_period": {
1571
+ "$ref": "#/components/schemas/BillingPeriod"
1572
+ },
1573
+ "unit_amount": {
1574
+ "type": "number"
1575
+ },
1576
+ "unit_amount_decimal": {
1577
+ "type": "string"
1578
+ },
1579
+ "unit_amount_currency": {
1580
+ "$ref": "#/components/schemas/Currency"
1581
+ },
1582
+ "billing_duration_amount": {
1583
+ "type": "number"
1584
+ },
1585
+ "billing_duration_unit": {
1586
+ "type": "string",
1587
+ "enum": [
1588
+ "weeks",
1589
+ "months",
1590
+ "years"
1591
+ ]
1592
+ },
1593
+ "notice_time_amount": {
1594
+ "type": "number"
1595
+ },
1596
+ "notice_time_unit": {
1597
+ "type": "string",
1598
+ "enum": [
1599
+ "weeks",
1600
+ "months",
1601
+ "years"
1602
+ ]
1603
+ },
1604
+ "termination_time_amount": {
1605
+ "type": "number"
1606
+ },
1607
+ "termination_time_unit": {
1608
+ "type": "string",
1609
+ "enum": [
1610
+ "weeks",
1611
+ "months",
1612
+ "years"
1613
+ ]
1614
+ },
1615
+ "renewal_duration_amount": {
1616
+ "type": "number"
1617
+ },
1618
+ "renewal_duration_unit": {
1619
+ "type": "string",
1620
+ "enum": [
1621
+ "weeks",
1622
+ "months",
1623
+ "years"
1624
+ ]
1625
+ },
1626
+ "_created_at": {
1627
+ "type": "string"
1628
+ },
1629
+ "_id": {
1630
+ "type": "string"
1631
+ },
1632
+ "_title": {
1633
+ "type": "string"
1634
+ },
1635
+ "_updated_at": {
1636
+ "type": "string"
1637
+ }
1638
+ }
1639
+ },
1640
+ "AvailabilityLocation": {
1641
+ "type": "object",
1642
+ "properties": {
1643
+ "street": {
1644
+ "type": "string",
1645
+ "description": "The first line of the address. Typically the street address or PO Box number."
1646
+ },
1647
+ "street_number": {
1648
+ "type": "string",
1649
+ "description": "The second line of the address. Typically the number of the apartment, suite, or unit."
1650
+ },
1651
+ "postal_code": {
1652
+ "type": "string",
1653
+ "description": "The postal code for the address."
1654
+ },
1655
+ "city": {
1656
+ "type": "string",
1657
+ "description": "The name of the city, district, village, or town."
1658
+ },
1659
+ "country": {
1660
+ "type": "string",
1661
+ "description": "The name of the country."
1662
+ }
1663
+ }
1664
+ },
1665
+ "AvailabilityDate": {
1666
+ "type": "object",
1667
+ "properties": {
1668
+ "available_start_date": {
1669
+ "type": "string",
1670
+ "format": "date",
1671
+ "description": "The availability interval start date",
1672
+ "example": "2017-07-21"
1673
+ },
1674
+ "available_end_date": {
1675
+ "type": "string",
1676
+ "format": "date",
1677
+ "description": "The availability interval end date",
1678
+ "example": "2017-07-21"
1679
+ }
1680
+ }
1681
+ },
1682
+ "AvailabilityFilters": {
1683
+ "description": "Availability filters dimensions",
1684
+ "type": "object",
1685
+ "properties": {
1686
+ "location": {
1687
+ "$ref": "#/components/schemas/AvailabilityLocation"
1688
+ },
1689
+ "available_date": {
1690
+ "type": "string",
1691
+ "format": "date",
1692
+ "example": "2017-07-21",
1693
+ "description": "A value to be matched against the availability window (start & end date)"
1694
+ }
1695
+ },
1696
+ "required": [
1697
+ "location"
1698
+ ]
1699
+ },
1700
+ "Address": {
1701
+ "type": "object",
1702
+ "additionalProperties": true,
1703
+ "properties": {
1704
+ "_tags": {
1705
+ "type": "array",
1706
+ "items": {
1707
+ "type": "string"
1708
+ },
1709
+ "example": [
1710
+ "billing"
1711
+ ]
1712
+ },
1713
+ "street": {
1714
+ "type": "string",
1715
+ "description": "The first line of the address. Typically the street address or PO Box number."
1716
+ },
1717
+ "street_number": {
1718
+ "type": "string",
1719
+ "description": "The second line of the address. Typically the number of the apartment, suite, or unit."
1720
+ },
1721
+ "postal_code": {
1722
+ "type": "string",
1723
+ "description": "The postal code for the address."
1724
+ },
1725
+ "city": {
1726
+ "type": "string",
1727
+ "description": "The name of the city, district, village, or town."
1728
+ },
1729
+ "country": {
1730
+ "type": "string",
1731
+ "description": "The two-letter code for the country of the address."
1732
+ },
1733
+ "additional_info": {
1734
+ "type": "string",
1735
+ "description": "An additional description for the address"
1736
+ }
1737
+ }
1738
+ },
1739
+ "PaymentMethod": {
1740
+ "type": "object",
1741
+ "description": "A PaymentMethod represent your customer's payment instruments.\n",
1742
+ "properties": {
1743
+ "type": {
1744
+ "type": "string",
1745
+ "description": "The type of the PaymentMethod."
1746
+ },
1747
+ "details": {
1748
+ "type": "object",
1749
+ "description": "Contains relevant data associated with the payment method type.",
1750
+ "additionalProperties": true
1751
+ }
1752
+ }
1753
+ },
1754
+ "Customer": {
1755
+ "type": "object",
1756
+ "properties": {
1757
+ "first_name": {
1758
+ "type": "string"
1759
+ },
1760
+ "last_name": {
1761
+ "type": "string"
1762
+ },
1763
+ "company_name": {
1764
+ "type": "string"
1765
+ },
1766
+ "vat_id": {
1767
+ "type": "string"
1768
+ },
1769
+ "email": {
1770
+ "type": "string",
1771
+ "description": "A valid email identifying the customer."
1772
+ },
1773
+ "phone": {
1774
+ "type": "string"
1775
+ }
1776
+ }
1777
+ },
1778
+ "Product": {
1779
+ "type": "object",
1780
+ "description": "The product configuration",
1781
+ "readOnly": true,
1782
+ "additionalProperties": true,
1783
+ "properties": {
1784
+ "code": {
1785
+ "type": "string"
1786
+ },
1787
+ "type": {
1788
+ "type": "string",
1789
+ "enum": [
1790
+ "Product",
1791
+ "Service"
1792
+ ]
1793
+ },
1794
+ "name": {
1795
+ "type": "string"
1796
+ },
1797
+ "_id": {
1798
+ "type": "string"
1799
+ },
1800
+ "_title": {
1801
+ "type": "string"
1802
+ },
1803
+ "_availability_files": {
1804
+ "type": "array",
1805
+ "items": {
1806
+ "$ref": "#/components/schemas/File"
1807
+ }
1808
+ }
1809
+ }
1810
+ },
1811
+ "File": {
1812
+ "type": "object",
1813
+ "additionalProperties": true,
1814
+ "properties": {
1815
+ "_id": {
1816
+ "type": "string"
1817
+ },
1818
+ "filename": {
1819
+ "type": "string"
1820
+ },
1821
+ "mime_type": {
1822
+ "type": "string"
1823
+ },
1824
+ "versions": {
1825
+ "type": "array",
1826
+ "items": {
1827
+ "type": "object",
1828
+ "additionalProperties": true,
1829
+ "properties": {
1830
+ "s3ref": {
1831
+ "type": "object",
1832
+ "properties": {
1833
+ "bucket": {
1834
+ "type": "string"
1835
+ },
1836
+ "key": {
1837
+ "type": "string"
1838
+ }
1839
+ },
1840
+ "required": [
1841
+ "bucket",
1842
+ "key"
1843
+ ]
1844
+ }
1845
+ },
1846
+ "required": [
1847
+ "s3ref"
1848
+ ]
1849
+ }
1850
+ },
1851
+ "_schema": {
1852
+ "type": "string"
1853
+ },
1854
+ "_org": {
1855
+ "type": "string"
1856
+ },
1857
+ "_created_at": {
1858
+ "type": "string",
1859
+ "format": "date-time"
1860
+ },
1861
+ "_updated_at": {
1862
+ "type": "string",
1863
+ "format": "date-time"
1864
+ },
1865
+ "_title": {
1866
+ "type": "string"
1867
+ },
1868
+ "$relation": {
1869
+ "$ref": "#/components/schemas/EntityRelation"
1870
+ }
1871
+ },
1872
+ "required": [
1873
+ "versions",
1874
+ "_id",
1875
+ "_schema",
1876
+ "_created_at",
1877
+ "_updated_at",
1878
+ "_org",
1879
+ "mime_type",
1880
+ "filename"
1881
+ ]
1882
+ },
1883
+ "EntityRelation": {
1884
+ "type": "object",
1885
+ "additionalProperties": true,
1886
+ "properties": {
1887
+ "entity_id": {
1888
+ "type": "string"
1889
+ },
1890
+ "_tags": {
1891
+ "type": "array",
1892
+ "items": {
1893
+ "type": "string"
1894
+ }
1895
+ }
1896
+ }
1897
+ },
1898
+ "Tax": {
1899
+ "type": "object",
1900
+ "description": "the tax configuration",
1901
+ "additionalProperties": true,
1902
+ "required": [
1903
+ "type",
1904
+ "rate",
1905
+ "behavior"
1906
+ ],
1907
+ "properties": {
1908
+ "type": {
1909
+ "type": "string",
1910
+ "enum": [
1911
+ "VAT",
1912
+ "GST",
1913
+ "Custom"
1914
+ ]
1915
+ },
1916
+ "description": {
1917
+ "type": "string"
1918
+ },
1919
+ "rate": {
1920
+ "type": "number"
1921
+ },
1922
+ "behavior": {
1923
+ "type": "string",
1924
+ "enum": [
1925
+ "Exclusive",
1926
+ "Inclusive"
1927
+ ]
1928
+ },
1929
+ "active": {
1930
+ "type": "boolean"
1931
+ },
1932
+ "region": {
1933
+ "type": "string"
1934
+ },
1935
+ "region_label": {
1936
+ "type": "string"
1937
+ }
1938
+ }
1939
+ }
1940
+ },
1941
+ "examples": {
1942
+ "checkoutWithCartId": {
1943
+ "value": {
1944
+ "mode": "create_order",
1945
+ "cart": "pZ324jnndf"
1946
+ }
1947
+ },
1948
+ "checkoutWithTransientCart": {
1949
+ "value": {
1950
+ "mode": "create_order",
1951
+ "cart": {
1952
+ "metadata": [
1953
+ {
1954
+ "key": "journey-id",
1955
+ "value": "8d0a2235-97ce-42d0-88a3-e374634ca44e"
1956
+ }
1957
+ ],
1958
+ "customer": {
1959
+ "first_name": "john",
1960
+ "last_name": "doe",
1961
+ "company_name": "company limited",
1962
+ "vat_id": "123892321",
1963
+ "email": "johndoe@company.com",
1964
+ "phone": "+44233242423"
1965
+ },
1966
+ "billing_address": {
1967
+ "street1": "wallstreet",
1968
+ "street2": 1,
1969
+ "city": "new york city",
1970
+ "country": "united states",
1971
+ "country_code": "US",
1972
+ "additional_info": "headquarters office"
1973
+ },
1974
+ "delivery_address": {
1975
+ "street1": "berverly hills avenue",
1976
+ "street2": "block 1",
1977
+ "city": "berverly hills",
1978
+ "country": "california",
1979
+ "country_code": "CA",
1980
+ "additional_info": "remote cowork place"
1981
+ },
1982
+ "line_items": [
1983
+ {
1984
+ "quantity": 1,
1985
+ "product": "b7185fb7-b10f-4875-bda7-288631446555",
1986
+ "price": "df240bab-9f71-4a9a-a9e1-59f18827dbf9"
1987
+ },
1988
+ {
1989
+ "quantity": 1,
1990
+ "product": "zzzzzz-b10f-4875-bda7-288631446555",
1991
+ "price": "zzzzz-9f71-4a9a-a9e1-59f18827dbf9"
1992
+ }
1993
+ ],
1994
+ "files": [
1995
+ "xf240bab-9f71-4a9a-a9e1-59f18827dbf9",
1996
+ "yf240bab-9f71-4a9a-a9e1-59f18827dbf9",
1997
+ "zf240bab-9f71-4a9a-a9e1-59f18827dbf9"
1998
+ ]
1999
+ }
2000
+ }
2001
+ },
2002
+ "checkoutResult": {
2003
+ "value": {
2004
+ "order": {
2005
+ "_id": "d1ZoC1FwZ6",
2006
+ "type": "Draft",
2007
+ "cart_id": "p0ZoB1FwH6",
2008
+ "order_number": "20201021-234324",
2009
+ "_org_id": 123,
2010
+ "metadata": [
2011
+ {
2012
+ "key": "journey-id",
2013
+ "value": "8d0a2235-97ce-42d0-88a3-e374634ca44e"
2014
+ }
2015
+ ],
2016
+ "billing_first_name": "john",
2017
+ "billing_last_name": "doe",
2018
+ "billing_company_name": "i me and myself",
2019
+ "billing_vat": "234823948",
2020
+ "billing_email": "johndoe@nowhere.com",
2021
+ "currency": "EUR",
2022
+ "billing_phone": "+1234234545",
2023
+ "billing_address": "wallstreet, 1",
2024
+ "billing_contact": "villy or zilly",
2025
+ "line_items": [
2026
+ {
2027
+ "id": "mSjGCTfn8w",
2028
+ "metadata": [
2029
+ {
2030
+ "cart_id": "p0ZoB1FwH6"
2031
+ }
2032
+ ],
2033
+ "description": "Wallbox Premium - Premium Price",
2034
+ "currency": "EUR",
2035
+ "unit_amount": 78900,
2036
+ "amount_subtotal": 50000,
2037
+ "amount_total": 61500,
2038
+ "quantity": 1,
2039
+ "product_id": "b7185fb7-b10f-4875-bda7-288631446555",
2040
+ "price_id": "df240bab-9f71-4a9a-a9e1-59f18827dbf9",
2041
+ "taxes": [
2042
+ {
2043
+ "amount": 11500,
2044
+ "rate": "MwSt. 23%"
2045
+ }
2046
+ ],
2047
+ "_price": {
2048
+ "_id": "df240bab-9f71-4a9a-a9e1-59f18827dbf9",
2049
+ "unit_amount": "€ 789",
2050
+ "type": "one_time",
2051
+ "active": true,
2052
+ "sales_tax": "standard",
2053
+ "tax_behavior": "inclusive",
2054
+ "description": "Winter Sale",
2055
+ "billing_scheme": "Per Unit",
2056
+ "tiers_mode": "Standard",
2057
+ "_created_at": "2021-11-10T18:02:58.318Z",
2058
+ "_updated_at": "2021-11-10T18:02:58.318Z",
2059
+ "_title": "Winter Sale"
2060
+ }
2061
+ },
2062
+ {
2063
+ "id": "mZkGCTfn6p",
2064
+ "metadata": [
2065
+ {
2066
+ "cart_id": "p0ZoB1FwH6"
2067
+ }
2068
+ ],
2069
+ "description": "Wallbox Basic with Full Add-ons - Basic Price",
2070
+ "currency": "EUR",
2071
+ "unit_amount": 78900,
2072
+ "amount_subtotal": 50000,
2073
+ "amount_total": 53500,
2074
+ "quantity": 1,
2075
+ "product_id": "zzzzzz-b10f-4875-bda7-288631446555",
2076
+ "price_id": "zzzzz-9f71-4a9a-a9e1-59f18827dbf9",
2077
+ "taxes": [
2078
+ {
2079
+ "amount": 3500,
2080
+ "rate": "MwSt. 7%"
2081
+ }
2082
+ ],
2083
+ "_price": {
2084
+ "_id": "zzzzz-9f71-4a9a-a9e1-59f18827dbf9",
2085
+ "unit_amount": "€ 789",
2086
+ "type": "one_time",
2087
+ "active": true,
2088
+ "sales_tax": "standard",
2089
+ "tax_behavior": "inclusive",
2090
+ "description": "Winter Sale",
2091
+ "billing_scheme": "Per Unit",
2092
+ "tiers_mode": "Standard",
2093
+ "_created_at": "2021-11-10T18:02:58.318Z",
2094
+ "_updated_at": "2021-11-10T18:02:58.318Z",
2095
+ "_title": "Winter Sale"
2096
+ }
2097
+ }
2098
+ ],
2099
+ "amount_subtotal": 100000,
2100
+ "amount_total": 115000,
2101
+ "total_details": {
2102
+ "amount_shipping": 10000,
2103
+ "amount_tax": 15000,
2104
+ "breakdown": [
2105
+ {
2106
+ "amount": 11500,
2107
+ "rate": "MwSt. 23%"
2108
+ },
2109
+ {
2110
+ "amount": 3500,
2111
+ "rate": "MwSt. 7%"
2112
+ }
2113
+ ]
2114
+ },
2115
+ "_created_at": "2021-11-10T18:02:58.318Z",
2116
+ "_updated_at": "2021-11-10T18:02:58.318Z"
2117
+ }
2118
+ }
2119
+ }
2120
+ }
2121
+ },
2122
+ "servers": [
2123
+ {
2124
+ "url": "https://pricing-api.sls.epilot.io"
2125
+ },
2126
+ {
2127
+ "url": "https://pricing-api.sls.epilot.io"
2128
+ }
2129
+ ]
2130
+ }