@epilot/pricing-client 1.13.0 → 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.
- package/LICENSE +21 -0
- package/README.md +4 -7
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -3
- package/dist/openapi.d.ts +395 -142
- package/dist/openapi.json +609 -195
- package/package.json +6 -5
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Pricing API",
|
|
5
|
-
"description": "This API hub sets the foundations for the following Pricing APIs:\n
|
|
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
6
|
"contact": {
|
|
7
7
|
"name": "Maintainers Channel",
|
|
8
8
|
"url": "https://epilot.slack.com/archives/C020B4URQNS"
|
|
@@ -15,25 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"tags": [
|
|
17
17
|
{
|
|
18
|
-
"name": "
|
|
19
|
-
"description": "
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "Public",
|
|
23
|
-
"description": "Customer-facing Endpoints (requiring a X-Ivy-Org-ID identification)"
|
|
18
|
+
"name": "Order",
|
|
19
|
+
"description": "Order Management"
|
|
24
20
|
},
|
|
25
21
|
{
|
|
26
22
|
"name": "Cart",
|
|
27
23
|
"description": "The shopping cart & checkout management operations"
|
|
28
24
|
},
|
|
29
|
-
{
|
|
30
|
-
"name": "Order",
|
|
31
|
-
"description": "Order management operations"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "Opportunity",
|
|
35
|
-
"description": "Opportunity management operations"
|
|
36
|
-
},
|
|
37
25
|
{
|
|
38
26
|
"name": "Product Catalog",
|
|
39
27
|
"description": "Product querying operations"
|
|
@@ -42,32 +30,69 @@
|
|
|
42
30
|
"security": [
|
|
43
31
|
{
|
|
44
32
|
"EpilotAuth": []
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"AsOrganization": []
|
|
48
33
|
}
|
|
49
34
|
],
|
|
50
35
|
"paths": {
|
|
51
|
-
"/v1/
|
|
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}": {
|
|
52
79
|
"put": {
|
|
53
|
-
"description": "
|
|
54
|
-
"operationId": "
|
|
55
|
-
"summary": "
|
|
56
|
-
"security": [],
|
|
80
|
+
"description": "Update an existing Order",
|
|
81
|
+
"operationId": "putOrder",
|
|
82
|
+
"summary": "putOrder",
|
|
57
83
|
"tags": [
|
|
58
|
-
"
|
|
59
|
-
"Public",
|
|
60
|
-
"Draft"
|
|
84
|
+
"Order"
|
|
61
85
|
],
|
|
62
86
|
"parameters": [
|
|
63
87
|
{
|
|
64
|
-
"in": "
|
|
65
|
-
"name": "
|
|
66
|
-
"description": "
|
|
88
|
+
"in": "path",
|
|
89
|
+
"name": "id",
|
|
90
|
+
"description": "Order entity ID",
|
|
67
91
|
"schema": {
|
|
68
92
|
"type": "string"
|
|
69
93
|
},
|
|
70
|
-
"required": true
|
|
94
|
+
"required": true,
|
|
95
|
+
"example": "1ec8518f-7538-48f7-8297-44f120d3e5cd"
|
|
71
96
|
}
|
|
72
97
|
],
|
|
73
98
|
"requestBody": {
|
|
@@ -75,28 +100,18 @@
|
|
|
75
100
|
"content": {
|
|
76
101
|
"application/json": {
|
|
77
102
|
"schema": {
|
|
78
|
-
"$ref": "#/components/schemas/
|
|
103
|
+
"$ref": "#/components/schemas/OrderPayload"
|
|
79
104
|
}
|
|
80
105
|
}
|
|
81
106
|
}
|
|
82
107
|
},
|
|
83
108
|
"responses": {
|
|
84
109
|
"200": {
|
|
85
|
-
"description": "
|
|
110
|
+
"description": "Order result",
|
|
86
111
|
"content": {
|
|
87
112
|
"application/json": {
|
|
88
113
|
"schema": {
|
|
89
|
-
"$ref": "#/components/schemas/
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"201": {
|
|
95
|
-
"description": "The new Cart.",
|
|
96
|
-
"content": {
|
|
97
|
-
"application/json": {
|
|
98
|
-
"schema": {
|
|
99
|
-
"$ref": "#/components/schemas/Cart"
|
|
114
|
+
"$ref": "#/components/schemas/Order"
|
|
100
115
|
}
|
|
101
116
|
}
|
|
102
117
|
}
|
|
@@ -121,8 +136,7 @@
|
|
|
121
136
|
"summary": "checkoutCart",
|
|
122
137
|
"security": [],
|
|
123
138
|
"tags": [
|
|
124
|
-
"Cart"
|
|
125
|
-
"Public"
|
|
139
|
+
"Cart"
|
|
126
140
|
],
|
|
127
141
|
"parameters": [
|
|
128
142
|
{
|
|
@@ -182,131 +196,43 @@
|
|
|
182
196
|
}
|
|
183
197
|
}
|
|
184
198
|
},
|
|
185
|
-
"/v1/
|
|
186
|
-
"
|
|
187
|
-
"description": "
|
|
188
|
-
"operationId": "$
|
|
189
|
-
"summary": "
|
|
190
|
-
"
|
|
191
|
-
"Cart",
|
|
192
|
-
"Draft"
|
|
193
|
-
],
|
|
194
|
-
"parameters": [
|
|
195
|
-
{
|
|
196
|
-
"in": "path",
|
|
197
|
-
"name": "cart-id",
|
|
198
|
-
"schema": {
|
|
199
|
-
"type": "string"
|
|
200
|
-
},
|
|
201
|
-
"description": "The id of the cart to be fetched",
|
|
202
|
-
"required": true
|
|
203
|
-
}
|
|
204
|
-
],
|
|
205
|
-
"responses": {
|
|
206
|
-
"200": {
|
|
207
|
-
"description": "The customer's cart.",
|
|
208
|
-
"content": {
|
|
209
|
-
"application/json": {
|
|
210
|
-
"schema": {
|
|
211
|
-
"$ref": "#/components/schemas/Cart"
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
"400": {
|
|
217
|
-
"description": "Invalid payload",
|
|
218
|
-
"content": {
|
|
219
|
-
"application/json": {
|
|
220
|
-
"schema": {
|
|
221
|
-
"$ref": "#/components/schemas/Error"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
"404": {
|
|
227
|
-
"description": "Cart not found"
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
"delete": {
|
|
232
|
-
"description": "Deletes the Cart specified and returns its content.",
|
|
233
|
-
"operationId": "$deleteCart",
|
|
234
|
-
"summary": "deleteCart",
|
|
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": [],
|
|
235
205
|
"tags": [
|
|
236
|
-
"
|
|
237
|
-
"Draft"
|
|
206
|
+
"Product Catalog"
|
|
238
207
|
],
|
|
239
208
|
"parameters": [
|
|
240
209
|
{
|
|
241
|
-
"in": "
|
|
242
|
-
"name": "
|
|
210
|
+
"in": "header",
|
|
211
|
+
"name": "X-Ivy-Org-ID",
|
|
212
|
+
"description": "The target Organization Id represented by the caller",
|
|
243
213
|
"schema": {
|
|
244
214
|
"type": "string"
|
|
245
215
|
},
|
|
246
|
-
"description": "The id of the cart to be deleted",
|
|
247
216
|
"required": true
|
|
248
217
|
}
|
|
249
218
|
],
|
|
250
|
-
"responses": {
|
|
251
|
-
"200": {
|
|
252
|
-
"description": "The customer's cart.",
|
|
253
|
-
"content": {
|
|
254
|
-
"application/json": {
|
|
255
|
-
"schema": {
|
|
256
|
-
"$ref": "#/components/schemas/Cart"
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
"400": {
|
|
262
|
-
"description": "Invalid payload",
|
|
263
|
-
"content": {
|
|
264
|
-
"application/json": {
|
|
265
|
-
"schema": {
|
|
266
|
-
"$ref": "#/components/schemas/Error"
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
"/v1/order": {
|
|
275
|
-
"put": {
|
|
276
|
-
"description": "Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.\nThe `order_number` can be used to universally identify an order within epilot platform.\n\nThe upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.\n\nWhen the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.\n\nOn multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.\n",
|
|
277
|
-
"operationId": "$upsertOrder",
|
|
278
|
-
"summary": "upsertOrder",
|
|
279
|
-
"tags": [
|
|
280
|
-
"Order",
|
|
281
|
-
"Draft"
|
|
282
|
-
],
|
|
283
219
|
"requestBody": {
|
|
284
220
|
"required": true,
|
|
285
221
|
"content": {
|
|
286
222
|
"application/json": {
|
|
287
223
|
"schema": {
|
|
288
|
-
"$ref": "#/components/schemas/
|
|
224
|
+
"$ref": "#/components/schemas/CatalogSearch"
|
|
289
225
|
}
|
|
290
226
|
}
|
|
291
227
|
}
|
|
292
228
|
},
|
|
293
229
|
"responses": {
|
|
294
230
|
"200": {
|
|
295
|
-
"description": "The
|
|
296
|
-
"content": {
|
|
297
|
-
"application/json": {
|
|
298
|
-
"schema": {
|
|
299
|
-
"$ref": "#/components/schemas/Order"
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
"201": {
|
|
305
|
-
"description": "The new Order.",
|
|
231
|
+
"description": "The search result",
|
|
306
232
|
"content": {
|
|
307
233
|
"application/json": {
|
|
308
234
|
"schema": {
|
|
309
|
-
"$ref": "#/components/schemas/
|
|
235
|
+
"$ref": "#/components/schemas/CatalogSearchResult"
|
|
310
236
|
}
|
|
311
237
|
}
|
|
312
238
|
}
|
|
@@ -324,15 +250,14 @@
|
|
|
324
250
|
}
|
|
325
251
|
}
|
|
326
252
|
},
|
|
327
|
-
"/v1/public/
|
|
253
|
+
"/v1/public/availability:check": {
|
|
328
254
|
"post": {
|
|
329
|
-
"description": "
|
|
330
|
-
"operationId": "$
|
|
331
|
-
"summary": "
|
|
255
|
+
"description": "The availability check endpoint",
|
|
256
|
+
"operationId": "$availabilityCheck",
|
|
257
|
+
"summary": "availabilityCheck",
|
|
332
258
|
"security": [],
|
|
333
259
|
"tags": [
|
|
334
|
-
"Product Catalog"
|
|
335
|
-
"Public"
|
|
260
|
+
"Product Catalog"
|
|
336
261
|
],
|
|
337
262
|
"parameters": [
|
|
338
263
|
{
|
|
@@ -350,18 +275,90 @@
|
|
|
350
275
|
"content": {
|
|
351
276
|
"application/json": {
|
|
352
277
|
"schema": {
|
|
353
|
-
"$ref": "#/components/schemas/
|
|
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
|
+
}
|
|
354
312
|
}
|
|
355
313
|
}
|
|
356
314
|
}
|
|
357
315
|
},
|
|
358
316
|
"responses": {
|
|
359
317
|
"200": {
|
|
360
|
-
"description": "The
|
|
318
|
+
"description": "The availability check result",
|
|
361
319
|
"content": {
|
|
362
320
|
"application/json": {
|
|
363
321
|
"schema": {
|
|
364
|
-
"$ref": "#/components/schemas/
|
|
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
|
+
}
|
|
365
362
|
}
|
|
366
363
|
}
|
|
367
364
|
}
|
|
@@ -381,14 +378,11 @@
|
|
|
381
378
|
},
|
|
382
379
|
"/v1/public/opportunity": {
|
|
383
380
|
"post": {
|
|
384
|
-
"
|
|
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",
|
|
385
383
|
"operationId": "$createOpportunity",
|
|
386
384
|
"summary": "createOpportunity",
|
|
387
385
|
"security": [],
|
|
388
|
-
"tags": [
|
|
389
|
-
"Opportunity",
|
|
390
|
-
"Public"
|
|
391
|
-
],
|
|
392
386
|
"parameters": [
|
|
393
387
|
{
|
|
394
388
|
"in": "header",
|
|
@@ -477,18 +471,6 @@
|
|
|
477
471
|
"type": "http",
|
|
478
472
|
"scheme": "bearer",
|
|
479
473
|
"description": "Epilot Bearer Token"
|
|
480
|
-
},
|
|
481
|
-
"AsOrganization": {
|
|
482
|
-
"type": "apiKey",
|
|
483
|
-
"in": "header",
|
|
484
|
-
"name": "x-ivy-org-id",
|
|
485
|
-
"description": "Set organization id when using internal auth"
|
|
486
|
-
},
|
|
487
|
-
"AsUser": {
|
|
488
|
-
"type": "apiKey",
|
|
489
|
-
"in": "header",
|
|
490
|
-
"name": "x-ivy-user-id",
|
|
491
|
-
"description": "Set user id when using internal auth"
|
|
492
474
|
}
|
|
493
475
|
},
|
|
494
476
|
"schemas": {
|
|
@@ -545,20 +527,35 @@
|
|
|
545
527
|
"description": "The max size of the response, defaults to 2000.",
|
|
546
528
|
"type": "number"
|
|
547
529
|
},
|
|
548
|
-
"
|
|
549
|
-
"type": "
|
|
550
|
-
"description": "
|
|
551
|
-
"
|
|
552
|
-
|
|
553
|
-
|
|
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"
|
|
554
537
|
}
|
|
555
538
|
},
|
|
556
539
|
"example": {
|
|
557
540
|
"q": "_id:1233432 OR _id:123432454 OR _id:23445433",
|
|
558
541
|
"sort": "description ASC",
|
|
559
542
|
"from": 0,
|
|
560
|
-
"size": 200
|
|
561
|
-
|
|
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
|
+
]
|
|
562
559
|
},
|
|
563
560
|
"CatalogSearchResult": {
|
|
564
561
|
"description": "The query result payload",
|
|
@@ -596,6 +593,80 @@
|
|
|
596
593
|
]
|
|
597
594
|
}
|
|
598
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
|
+
},
|
|
599
670
|
"CartDto": {
|
|
600
671
|
"description": "A valid cart payload from a client.",
|
|
601
672
|
"properties": {
|
|
@@ -611,6 +682,25 @@
|
|
|
611
682
|
"delivery_address": {
|
|
612
683
|
"$ref": "#/components/schemas/Address"
|
|
613
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
|
+
},
|
|
614
704
|
"payment_method": {
|
|
615
705
|
"$ref": "#/components/schemas/PaymentMethod"
|
|
616
706
|
},
|
|
@@ -624,6 +714,23 @@
|
|
|
624
714
|
"type": "string",
|
|
625
715
|
"description": "a string representing a file ID as received from the File API"
|
|
626
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
|
|
627
734
|
}
|
|
628
735
|
},
|
|
629
736
|
"required": [
|
|
@@ -668,6 +775,17 @@
|
|
|
668
775
|
"create_quote"
|
|
669
776
|
]
|
|
670
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
|
+
},
|
|
671
789
|
"PriceItemsDto": {
|
|
672
790
|
"description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
|
|
673
791
|
"type": "array",
|
|
@@ -728,6 +846,10 @@
|
|
|
728
846
|
},
|
|
729
847
|
"_price": {
|
|
730
848
|
"$ref": "#/components/schemas/Price"
|
|
849
|
+
},
|
|
850
|
+
"_product": {
|
|
851
|
+
"description": "The product linked to the price item.",
|
|
852
|
+
"$ref": "#/components/schemas/Product"
|
|
731
853
|
}
|
|
732
854
|
}
|
|
733
855
|
},
|
|
@@ -749,6 +871,38 @@
|
|
|
749
871
|
}
|
|
750
872
|
}
|
|
751
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
|
+
},
|
|
752
906
|
"RecurrenceAmountDto": {
|
|
753
907
|
"type": "object",
|
|
754
908
|
"description": "An amount associated with a specific recurrence.",
|
|
@@ -844,7 +998,8 @@
|
|
|
844
998
|
},
|
|
845
999
|
"Currency": {
|
|
846
1000
|
"type": "string",
|
|
847
|
-
"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"
|
|
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"
|
|
848
1003
|
},
|
|
849
1004
|
"Opportunity": {
|
|
850
1005
|
"type": "object",
|
|
@@ -912,6 +1067,19 @@
|
|
|
912
1067
|
"type": "string",
|
|
913
1068
|
"readOnly": true
|
|
914
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
|
+
},
|
|
915
1083
|
"_tags": {
|
|
916
1084
|
"type": "array",
|
|
917
1085
|
"items": {
|
|
@@ -937,6 +1105,73 @@
|
|
|
937
1105
|
}
|
|
938
1106
|
}
|
|
939
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
|
+
},
|
|
940
1175
|
"Order": {
|
|
941
1176
|
"type": "object",
|
|
942
1177
|
"description": "The order entity",
|
|
@@ -951,17 +1186,20 @@
|
|
|
951
1186
|
"description": "The cart id that originated or is associated with the order"
|
|
952
1187
|
},
|
|
953
1188
|
"status": {
|
|
1189
|
+
"$ref": "#/components/schemas/OrderStatus"
|
|
1190
|
+
},
|
|
1191
|
+
"source_type": {
|
|
954
1192
|
"type": "string",
|
|
955
|
-
"
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
"
|
|
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"
|
|
965
1203
|
},
|
|
966
1204
|
"metadata": {
|
|
967
1205
|
"$ref": "#/components/schemas/MetaData"
|
|
@@ -1083,6 +1321,11 @@
|
|
|
1083
1321
|
"description": "Total before any (discounts or) taxes are applied.",
|
|
1084
1322
|
"readOnly": true
|
|
1085
1323
|
},
|
|
1324
|
+
"unit_amount_net": {
|
|
1325
|
+
"type": "integer",
|
|
1326
|
+
"description": "Net unit amount without taxes.",
|
|
1327
|
+
"readOnly": true
|
|
1328
|
+
},
|
|
1086
1329
|
"amount_total": {
|
|
1087
1330
|
"type": "integer",
|
|
1088
1331
|
"description": "Total after (discounts and) taxes.",
|
|
@@ -1271,10 +1514,11 @@
|
|
|
1271
1514
|
"monthly",
|
|
1272
1515
|
"every_quarter",
|
|
1273
1516
|
"every_6_months",
|
|
1274
|
-
"yearly"
|
|
1517
|
+
"yearly",
|
|
1518
|
+
"one_time"
|
|
1275
1519
|
]
|
|
1276
1520
|
},
|
|
1277
|
-
"
|
|
1521
|
+
"SalesTax": {
|
|
1278
1522
|
"type": "string",
|
|
1279
1523
|
"enum": [
|
|
1280
1524
|
"nontaxable",
|
|
@@ -1301,7 +1545,7 @@
|
|
|
1301
1545
|
"type": "string"
|
|
1302
1546
|
},
|
|
1303
1547
|
"sales_tax": {
|
|
1304
|
-
"$ref": "#/components/schemas/
|
|
1548
|
+
"$ref": "#/components/schemas/SalesTax"
|
|
1305
1549
|
},
|
|
1306
1550
|
"tax_behavior": {
|
|
1307
1551
|
"type": "string",
|
|
@@ -1393,10 +1637,79 @@
|
|
|
1393
1637
|
}
|
|
1394
1638
|
}
|
|
1395
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
|
+
},
|
|
1396
1700
|
"Address": {
|
|
1397
1701
|
"type": "object",
|
|
1398
1702
|
"additionalProperties": true,
|
|
1399
1703
|
"properties": {
|
|
1704
|
+
"_tags": {
|
|
1705
|
+
"type": "array",
|
|
1706
|
+
"items": {
|
|
1707
|
+
"type": "string"
|
|
1708
|
+
},
|
|
1709
|
+
"example": [
|
|
1710
|
+
"billing"
|
|
1711
|
+
]
|
|
1712
|
+
},
|
|
1400
1713
|
"street": {
|
|
1401
1714
|
"type": "string",
|
|
1402
1715
|
"description": "The first line of the address. Typically the street address or PO Box number."
|
|
@@ -1486,6 +1799,99 @@
|
|
|
1486
1799
|
},
|
|
1487
1800
|
"_title": {
|
|
1488
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
|
+
}
|
|
1489
1895
|
}
|
|
1490
1896
|
}
|
|
1491
1897
|
},
|
|
@@ -1712,5 +2118,13 @@
|
|
|
1712
2118
|
}
|
|
1713
2119
|
}
|
|
1714
2120
|
}
|
|
1715
|
-
}
|
|
2121
|
+
},
|
|
2122
|
+
"servers": [
|
|
2123
|
+
{
|
|
2124
|
+
"url": "https://pricing-api.sls.epilot.io"
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
"url": "https://pricing-api.sls.epilot.io"
|
|
2128
|
+
}
|
|
2129
|
+
]
|
|
1716
2130
|
}
|