@epilot/pricing-client 3.47.9-alpha.7 → 3.47.9
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/dist/openapi.d.ts +533 -481
- package/dist/openapi.json +464 -227
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -2211,6 +2211,133 @@
|
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
|
+
},
|
|
2215
|
+
"/v1/public/product-recommendations": {
|
|
2216
|
+
"post": {
|
|
2217
|
+
"description": "Get a list of product recommendations based on the search parameters.",
|
|
2218
|
+
"operationId": "$productRecommendations",
|
|
2219
|
+
"summary": "productRecommendations",
|
|
2220
|
+
"security": [
|
|
2221
|
+
{
|
|
2222
|
+
"EpilotPublicAuth": []
|
|
2223
|
+
}
|
|
2224
|
+
],
|
|
2225
|
+
"tags": [
|
|
2226
|
+
"Product Recommendations API"
|
|
2227
|
+
],
|
|
2228
|
+
"parameters": [
|
|
2229
|
+
{
|
|
2230
|
+
"in": "header",
|
|
2231
|
+
"name": "X-Ivy-Org-ID",
|
|
2232
|
+
"description": "The target Organization Id represented by the caller",
|
|
2233
|
+
"example": 739224,
|
|
2234
|
+
"schema": {
|
|
2235
|
+
"type": "string"
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
],
|
|
2239
|
+
"requestBody": {
|
|
2240
|
+
"required": true,
|
|
2241
|
+
"content": {
|
|
2242
|
+
"application/json": {
|
|
2243
|
+
"schema": {
|
|
2244
|
+
"$ref": "#/components/schemas/ProductRecommendationSearch"
|
|
2245
|
+
},
|
|
2246
|
+
"examples": {
|
|
2247
|
+
"Search product recommendations by id": {
|
|
2248
|
+
"value": {
|
|
2249
|
+
"product_recommendation_ids": [
|
|
2250
|
+
"bae8d40a-0093-483a-b4f9-3653800b6781"
|
|
2251
|
+
]
|
|
2252
|
+
}
|
|
2253
|
+
},
|
|
2254
|
+
"Search product recommendations source product and price": {
|
|
2255
|
+
"value": {
|
|
2256
|
+
"catalog_item": {
|
|
2257
|
+
"product_id": "aa1ebf85-f36e-46ff-978c-ed948c646f12",
|
|
2258
|
+
"price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76"
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
},
|
|
2266
|
+
"responses": {
|
|
2267
|
+
"200": {
|
|
2268
|
+
"description": "The product recommendations result",
|
|
2269
|
+
"content": {
|
|
2270
|
+
"application/json": {
|
|
2271
|
+
"schema": {
|
|
2272
|
+
"$ref": "#/components/schemas/ProductRecommendationResponse"
|
|
2273
|
+
},
|
|
2274
|
+
"examples": {
|
|
2275
|
+
"Product recommendations": {
|
|
2276
|
+
"value": {
|
|
2277
|
+
"hits": 1,
|
|
2278
|
+
"results": [
|
|
2279
|
+
{
|
|
2280
|
+
"_title": "Tarifwechsel 2025",
|
|
2281
|
+
"_created_at": "2025-01-29T15:46:41.014Z",
|
|
2282
|
+
"_updated_at": "2025-01-29T15:46:41.014Z",
|
|
2283
|
+
"name": "Tarifwechsel 2025",
|
|
2284
|
+
"type": "change",
|
|
2285
|
+
"source_product": {
|
|
2286
|
+
"$relation": [
|
|
2287
|
+
{
|
|
2288
|
+
"entity_id": "e2b12b54-d904-42b7-ac44-802d8ebaadf4"
|
|
2289
|
+
}
|
|
2290
|
+
]
|
|
2291
|
+
},
|
|
2292
|
+
"source_price": {
|
|
2293
|
+
"$relation": [
|
|
2294
|
+
{
|
|
2295
|
+
"entity_id": "255877f3-f9c2-483e-9c71-89088c142bfc"
|
|
2296
|
+
}
|
|
2297
|
+
]
|
|
2298
|
+
},
|
|
2299
|
+
"_schema": "product_recommendation",
|
|
2300
|
+
"offers": [
|
|
2301
|
+
{
|
|
2302
|
+
"target_id": "f9aa8757-505b-46bd-9310-605d64849565",
|
|
2303
|
+
"items": [
|
|
2304
|
+
{
|
|
2305
|
+
"product_id": "70ad8a08-46c2-473b-b1c5-8bccfb85e452",
|
|
2306
|
+
"price_id": "26c9c39d-db4a-4132-af2e-86ab5c7b156c"
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
"product_id": "dd97a2a4-e48b-43c5-8717-7ac563c67e05",
|
|
2310
|
+
"price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76"
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
"product_id": "aa1ebf85-f36e-46ff-978c-ed948c646f12",
|
|
2314
|
+
"price_id": "4ecf9a61-a974-4594-bae2-bcb798f54d76"
|
|
2315
|
+
}
|
|
2316
|
+
]
|
|
2317
|
+
}
|
|
2318
|
+
],
|
|
2319
|
+
"_id": "6d872912-ef8a-4815-b9db-01744c0828ac",
|
|
2320
|
+
"_org": "739224"
|
|
2321
|
+
}
|
|
2322
|
+
]
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
},
|
|
2329
|
+
"400": {
|
|
2330
|
+
"description": "Invalid payload",
|
|
2331
|
+
"content": {
|
|
2332
|
+
"application/json": {
|
|
2333
|
+
"schema": {
|
|
2334
|
+
"$ref": "#/components/schemas/Error"
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2214
2341
|
}
|
|
2215
2342
|
},
|
|
2216
2343
|
"components": {
|
|
@@ -2841,7 +2968,10 @@
|
|
|
2841
2968
|
},
|
|
2842
2969
|
"is_composite_price": {
|
|
2843
2970
|
"description": "The flag for prices that contain price components.",
|
|
2844
|
-
"type": "boolean"
|
|
2971
|
+
"type": "boolean",
|
|
2972
|
+
"enum": [
|
|
2973
|
+
false
|
|
2974
|
+
]
|
|
2845
2975
|
},
|
|
2846
2976
|
"pricing_model": {
|
|
2847
2977
|
"type": "string",
|
|
@@ -3017,19 +3147,22 @@
|
|
|
3017
3147
|
"pricing_model"
|
|
3018
3148
|
]
|
|
3019
3149
|
},
|
|
3020
|
-
"
|
|
3150
|
+
"BaseCompositePrice": {
|
|
3021
3151
|
"allOf": [
|
|
3022
3152
|
{
|
|
3023
3153
|
"$ref": "#/components/schemas/PriceConditions"
|
|
3024
3154
|
}
|
|
3025
3155
|
],
|
|
3026
3156
|
"type": "object",
|
|
3027
|
-
"description": "The price entity
|
|
3157
|
+
"description": "The common properties for a composite price entity, without the price components",
|
|
3028
3158
|
"example": {
|
|
3029
3159
|
"$ref": "#/components/examples/composite-price"
|
|
3030
3160
|
},
|
|
3031
3161
|
"additionalProperties": true,
|
|
3032
3162
|
"readOnly": true,
|
|
3163
|
+
"required": [
|
|
3164
|
+
"is_composite_price"
|
|
3165
|
+
],
|
|
3033
3166
|
"properties": {
|
|
3034
3167
|
"active": {
|
|
3035
3168
|
"type": "boolean",
|
|
@@ -3071,7 +3204,10 @@
|
|
|
3071
3204
|
},
|
|
3072
3205
|
"is_composite_price": {
|
|
3073
3206
|
"description": "The flag for prices that contain price components.",
|
|
3074
|
-
"type": "boolean"
|
|
3207
|
+
"type": "boolean",
|
|
3208
|
+
"enum": [
|
|
3209
|
+
true
|
|
3210
|
+
]
|
|
3075
3211
|
},
|
|
3076
3212
|
"_created_at": {
|
|
3077
3213
|
"description": "The price creation date",
|
|
@@ -3102,6 +3238,58 @@
|
|
|
3102
3238
|
}
|
|
3103
3239
|
}
|
|
3104
3240
|
},
|
|
3241
|
+
"NonHydratedCompositePrice": {
|
|
3242
|
+
"allOf": [
|
|
3243
|
+
{
|
|
3244
|
+
"$ref": "#/components/schemas/BaseCompositePrice"
|
|
3245
|
+
}
|
|
3246
|
+
],
|
|
3247
|
+
"type": "object",
|
|
3248
|
+
"description": "The composite price entity",
|
|
3249
|
+
"properties": {
|
|
3250
|
+
"price_components": {
|
|
3251
|
+
"description": "A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.",
|
|
3252
|
+
"type": "object",
|
|
3253
|
+
"properties": {
|
|
3254
|
+
"$relation": {
|
|
3255
|
+
"type": "array",
|
|
3256
|
+
"items": {
|
|
3257
|
+
"$ref": "#/components/schemas/PriceComponentRelation"
|
|
3258
|
+
}
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
},
|
|
3264
|
+
"HydratedCompositePrice": {
|
|
3265
|
+
"allOf": [
|
|
3266
|
+
{
|
|
3267
|
+
"$ref": "#/components/schemas/BaseCompositePrice"
|
|
3268
|
+
}
|
|
3269
|
+
],
|
|
3270
|
+
"type": "object",
|
|
3271
|
+
"description": "The composite price entity",
|
|
3272
|
+
"properties": {
|
|
3273
|
+
"price_components": {
|
|
3274
|
+
"description": "A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price.",
|
|
3275
|
+
"type": "array",
|
|
3276
|
+
"items": {
|
|
3277
|
+
"$ref": "#/components/schemas/Price"
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
},
|
|
3282
|
+
"CompositePrice": {
|
|
3283
|
+
"oneOf": [
|
|
3284
|
+
{
|
|
3285
|
+
"$ref": "#/components/schemas/NonHydratedCompositePrice"
|
|
3286
|
+
},
|
|
3287
|
+
{
|
|
3288
|
+
"$ref": "#/components/schemas/HydratedCompositePrice"
|
|
3289
|
+
}
|
|
3290
|
+
],
|
|
3291
|
+
"description": "The composite price entity"
|
|
3292
|
+
},
|
|
3105
3293
|
"PriceComponentRelation": {
|
|
3106
3294
|
"type": "object",
|
|
3107
3295
|
"properties": {
|
|
@@ -3193,14 +3381,7 @@
|
|
|
3193
3381
|
}
|
|
3194
3382
|
},
|
|
3195
3383
|
"example": {
|
|
3196
|
-
"
|
|
3197
|
-
"frequency_unit": "weekly",
|
|
3198
|
-
"value": 1000.245,
|
|
3199
|
-
"name": "avg consumption",
|
|
3200
|
-
"metadata": {
|
|
3201
|
-
"journey_title": "energy journey",
|
|
3202
|
-
"step_name": "avg consumption picker"
|
|
3203
|
-
}
|
|
3384
|
+
"$ref": "#/components/examples/price-input-mapping/value"
|
|
3204
3385
|
}
|
|
3205
3386
|
},
|
|
3206
3387
|
"PriceConditions": {
|
|
@@ -3293,14 +3474,9 @@
|
|
|
3293
3474
|
"items": {
|
|
3294
3475
|
"$ref": "#/components/schemas/ExternalFeeMapping"
|
|
3295
3476
|
},
|
|
3296
|
-
"example":
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
"frequency_unit": "weekly",
|
|
3300
|
-
"amount_total": 1000,
|
|
3301
|
-
"amount_total_decimal": "10.00"
|
|
3302
|
-
}
|
|
3303
|
-
]
|
|
3477
|
+
"example": {
|
|
3478
|
+
"$ref": "#/components/examples/external-fee-mappings/value"
|
|
3479
|
+
}
|
|
3304
3480
|
},
|
|
3305
3481
|
"ExternalFeeMapping": {
|
|
3306
3482
|
"type": "object",
|
|
@@ -3327,10 +3503,7 @@
|
|
|
3327
3503
|
}
|
|
3328
3504
|
},
|
|
3329
3505
|
"example": {
|
|
3330
|
-
"
|
|
3331
|
-
"frequency_unit": "weekly",
|
|
3332
|
-
"amount_total": 1000,
|
|
3333
|
-
"amount_total_decimal": "10.00"
|
|
3506
|
+
"$ref": "#/components/examples/external-fee-mapping/value"
|
|
3334
3507
|
}
|
|
3335
3508
|
},
|
|
3336
3509
|
"CatalogSearch": {
|
|
@@ -4387,7 +4560,7 @@
|
|
|
4387
4560
|
}
|
|
4388
4561
|
}
|
|
4389
4562
|
},
|
|
4390
|
-
"
|
|
4563
|
+
"PriceItemDtoUnion": {
|
|
4391
4564
|
"anyOf": [
|
|
4392
4565
|
{
|
|
4393
4566
|
"$ref": "#/components/schemas/PriceItemDto"
|
|
@@ -4408,7 +4581,7 @@
|
|
|
4408
4581
|
"description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
|
|
4409
4582
|
"type": "array",
|
|
4410
4583
|
"items": {
|
|
4411
|
-
"$ref": "#/components/schemas/
|
|
4584
|
+
"$ref": "#/components/schemas/PriceItemDtoUnion"
|
|
4412
4585
|
}
|
|
4413
4586
|
},
|
|
4414
4587
|
"BasePriceItemDto": {
|
|
@@ -4501,14 +4674,11 @@
|
|
|
4501
4674
|
]
|
|
4502
4675
|
},
|
|
4503
4676
|
"billing_period": {
|
|
4504
|
-
"type": "string",
|
|
4505
4677
|
"description": "The price billing period.",
|
|
4506
|
-
"
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
"every_6_months",
|
|
4511
|
-
"yearly"
|
|
4678
|
+
"oneOf": [
|
|
4679
|
+
{
|
|
4680
|
+
"$ref": "#/components/schemas/BillingPeriod"
|
|
4681
|
+
}
|
|
4512
4682
|
]
|
|
4513
4683
|
},
|
|
4514
4684
|
"unit_amount": {
|
|
@@ -4565,6 +4735,9 @@
|
|
|
4565
4735
|
},
|
|
4566
4736
|
{
|
|
4567
4737
|
"type": "object",
|
|
4738
|
+
"required": [
|
|
4739
|
+
"is_composite_price"
|
|
4740
|
+
],
|
|
4568
4741
|
"properties": {
|
|
4569
4742
|
"is_composite_price": {
|
|
4570
4743
|
"description": "The flag for prices that contain price components.",
|
|
@@ -4667,14 +4840,11 @@
|
|
|
4667
4840
|
"description": "The price type."
|
|
4668
4841
|
},
|
|
4669
4842
|
"billing_period": {
|
|
4670
|
-
"type": "string",
|
|
4671
4843
|
"description": "The price billing period.",
|
|
4672
|
-
"
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
"every_6_months",
|
|
4677
|
-
"yearly"
|
|
4844
|
+
"oneOf": [
|
|
4845
|
+
{
|
|
4846
|
+
"$ref": "#/components/schemas/BillingPeriod"
|
|
4847
|
+
}
|
|
4678
4848
|
]
|
|
4679
4849
|
},
|
|
4680
4850
|
"unit_amount_gross": {
|
|
@@ -4872,7 +5042,17 @@
|
|
|
4872
5042
|
],
|
|
4873
5043
|
"description": "Represents a composite price input to the pricing library.",
|
|
4874
5044
|
"type": "object",
|
|
5045
|
+
"required": [
|
|
5046
|
+
"is_composite_price"
|
|
5047
|
+
],
|
|
4875
5048
|
"properties": {
|
|
5049
|
+
"is_composite_price": {
|
|
5050
|
+
"description": "The flag for prices that contain price components.",
|
|
5051
|
+
"type": "boolean",
|
|
5052
|
+
"enum": [
|
|
5053
|
+
true
|
|
5054
|
+
]
|
|
5055
|
+
},
|
|
4876
5056
|
"item_components": {
|
|
4877
5057
|
"type": "array",
|
|
4878
5058
|
"description": "Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).",
|
|
@@ -5170,15 +5350,19 @@
|
|
|
5170
5350
|
"recurring"
|
|
5171
5351
|
]
|
|
5172
5352
|
},
|
|
5353
|
+
"is_composite_price": {
|
|
5354
|
+
"description": "The flag for prices that contain price components.",
|
|
5355
|
+
"type": "boolean",
|
|
5356
|
+
"enum": [
|
|
5357
|
+
false
|
|
5358
|
+
]
|
|
5359
|
+
},
|
|
5173
5360
|
"billing_period": {
|
|
5174
|
-
"type": "string",
|
|
5175
5361
|
"description": "The price billing period.",
|
|
5176
|
-
"
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
"every_6_months",
|
|
5181
|
-
"yearly"
|
|
5362
|
+
"oneOf": [
|
|
5363
|
+
{
|
|
5364
|
+
"$ref": "#/components/schemas/BillingPeriod"
|
|
5365
|
+
}
|
|
5182
5366
|
]
|
|
5183
5367
|
},
|
|
5184
5368
|
"pricing_model": {
|
|
@@ -5270,14 +5454,11 @@
|
|
|
5270
5454
|
"description": "The price type."
|
|
5271
5455
|
},
|
|
5272
5456
|
"billing_period": {
|
|
5273
|
-
"type": "string",
|
|
5274
5457
|
"description": "The price billing period.",
|
|
5275
|
-
"
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
"every_6_months",
|
|
5280
|
-
"yearly"
|
|
5458
|
+
"oneOf": [
|
|
5459
|
+
{
|
|
5460
|
+
"$ref": "#/components/schemas/BillingPeriod"
|
|
5461
|
+
}
|
|
5281
5462
|
]
|
|
5282
5463
|
},
|
|
5283
5464
|
"unit_amount_gross": {
|
|
@@ -5340,14 +5521,11 @@
|
|
|
5340
5521
|
"description": "The price type."
|
|
5341
5522
|
},
|
|
5342
5523
|
"billing_period": {
|
|
5343
|
-
"type": "string",
|
|
5344
5524
|
"description": "The price billing period.",
|
|
5345
|
-
"
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
"every_6_months",
|
|
5350
|
-
"yearly"
|
|
5525
|
+
"oneOf": [
|
|
5526
|
+
{
|
|
5527
|
+
"$ref": "#/components/schemas/BillingPeriod"
|
|
5528
|
+
}
|
|
5351
5529
|
]
|
|
5352
5530
|
},
|
|
5353
5531
|
"amount_total": {
|
|
@@ -5502,7 +5680,7 @@
|
|
|
5502
5680
|
"matched_coupons": {
|
|
5503
5681
|
"type": "array",
|
|
5504
5682
|
"items": {
|
|
5505
|
-
"$ref": "#/components/schemas/
|
|
5683
|
+
"$ref": "#/components/schemas/CouponWithoutPromoCodes"
|
|
5506
5684
|
}
|
|
5507
5685
|
}
|
|
5508
5686
|
}
|
|
@@ -5820,15 +5998,7 @@
|
|
|
5820
5998
|
"_updated_at"
|
|
5821
5999
|
],
|
|
5822
6000
|
"example": {
|
|
5823
|
-
"
|
|
5824
|
-
"_org": "123",
|
|
5825
|
-
"_schema": "contact",
|
|
5826
|
-
"_tags": [
|
|
5827
|
-
"example",
|
|
5828
|
-
"mock"
|
|
5829
|
-
],
|
|
5830
|
-
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
5831
|
-
"_updated_at": "2021-02-09T12:41:43.662Z"
|
|
6001
|
+
"$ref": "#/components/examples/entity-item/value"
|
|
5832
6002
|
}
|
|
5833
6003
|
},
|
|
5834
6004
|
"EntityRelation": {
|
|
@@ -5915,20 +6085,7 @@
|
|
|
5915
6085
|
}
|
|
5916
6086
|
},
|
|
5917
6087
|
"example": {
|
|
5918
|
-
"
|
|
5919
|
-
"type": "VAT",
|
|
5920
|
-
"description": "Tax description",
|
|
5921
|
-
"active": "true",
|
|
5922
|
-
"region": "DE",
|
|
5923
|
-
"region_label": "Germany",
|
|
5924
|
-
"_org": "123",
|
|
5925
|
-
"_schema": "tax",
|
|
5926
|
-
"_tags": [
|
|
5927
|
-
"example",
|
|
5928
|
-
"mock"
|
|
5929
|
-
],
|
|
5930
|
-
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
5931
|
-
"_updated_at": "2021-02-09T12:41:43.662Z"
|
|
6088
|
+
"$ref": "#/components/examples/tax/value"
|
|
5932
6089
|
}
|
|
5933
6090
|
},
|
|
5934
6091
|
"TaxBreakdownInfo": {
|
|
@@ -5951,9 +6108,9 @@
|
|
|
5951
6108
|
}
|
|
5952
6109
|
}
|
|
5953
6110
|
},
|
|
5954
|
-
"
|
|
6111
|
+
"BaseCouponCommon": {
|
|
5955
6112
|
"type": "object",
|
|
5956
|
-
"description": "The coupon
|
|
6113
|
+
"description": "The shared properties for the coupon entity and coupon item entity",
|
|
5957
6114
|
"additionalProperties": true,
|
|
5958
6115
|
"required": [
|
|
5959
6116
|
"name",
|
|
@@ -5962,7 +6119,9 @@
|
|
|
5962
6119
|
"_org",
|
|
5963
6120
|
"_schema",
|
|
5964
6121
|
"_created_at",
|
|
5965
|
-
"_updated_at"
|
|
6122
|
+
"_updated_at",
|
|
6123
|
+
"type",
|
|
6124
|
+
"category"
|
|
5966
6125
|
],
|
|
5967
6126
|
"properties": {
|
|
5968
6127
|
"_id": {
|
|
@@ -6063,7 +6222,18 @@
|
|
|
6063
6222
|
"requires_promo_code": {
|
|
6064
6223
|
"type": "boolean",
|
|
6065
6224
|
"description": "Whether the coupon requires a promo code to be applied"
|
|
6066
|
-
}
|
|
6225
|
+
}
|
|
6226
|
+
}
|
|
6227
|
+
},
|
|
6228
|
+
"CouponWithoutPromoCodes": {
|
|
6229
|
+
"type": "object",
|
|
6230
|
+
"description": "The base for the coupon entity without promo codes",
|
|
6231
|
+
"allOf": [
|
|
6232
|
+
{
|
|
6233
|
+
"$ref": "#/components/schemas/BaseCouponCommon"
|
|
6234
|
+
}
|
|
6235
|
+
],
|
|
6236
|
+
"properties": {
|
|
6067
6237
|
"prices": {
|
|
6068
6238
|
"description": "The prices associated with the coupon. Will hold price entities if hydrated, relations otherwise.",
|
|
6069
6239
|
"oneOf": [
|
|
@@ -6088,36 +6258,14 @@
|
|
|
6088
6258
|
}
|
|
6089
6259
|
},
|
|
6090
6260
|
"example": {
|
|
6091
|
-
"
|
|
6092
|
-
"_schema": "coupon",
|
|
6093
|
-
"_org": "org_12345",
|
|
6094
|
-
"_created_at": "2024-01-15T10:00:00.000Z",
|
|
6095
|
-
"_updated_at": "2024-01-20T12:00:00.000Z",
|
|
6096
|
-
"_title": "Sample Coupon",
|
|
6097
|
-
"name": "Sample Coupon",
|
|
6098
|
-
"type": "fixed",
|
|
6099
|
-
"fixed_value": 555,
|
|
6100
|
-
"fixed_value_currency": "USD",
|
|
6101
|
-
"fixed_value_decimal": "5.55",
|
|
6102
|
-
"active": true,
|
|
6103
|
-
"prices": {
|
|
6104
|
-
"$relation": [
|
|
6105
|
-
{
|
|
6106
|
-
"entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
6107
|
-
"_tags": [
|
|
6108
|
-
"discount",
|
|
6109
|
-
"special"
|
|
6110
|
-
],
|
|
6111
|
-
"_schema": "price"
|
|
6112
|
-
}
|
|
6113
|
-
]
|
|
6114
|
-
}
|
|
6261
|
+
"$ref": "#/components/examples/coupon-without-promo-codes/value"
|
|
6115
6262
|
}
|
|
6116
6263
|
},
|
|
6117
6264
|
"Coupon": {
|
|
6265
|
+
"description": "The coupon entity",
|
|
6118
6266
|
"allOf": [
|
|
6119
6267
|
{
|
|
6120
|
-
"$ref": "#/components/schemas/
|
|
6268
|
+
"$ref": "#/components/schemas/CouponWithoutPromoCodes"
|
|
6121
6269
|
}
|
|
6122
6270
|
],
|
|
6123
6271
|
"type": "object",
|
|
@@ -6139,117 +6287,9 @@
|
|
|
6139
6287
|
},
|
|
6140
6288
|
"CouponItem": {
|
|
6141
6289
|
"type": "object",
|
|
6142
|
-
"required": [
|
|
6143
|
-
"type",
|
|
6144
|
-
"category",
|
|
6145
|
-
"_schema"
|
|
6146
|
-
],
|
|
6147
|
-
"properties": {
|
|
6148
|
-
"_id": {
|
|
6149
|
-
"$ref": "#/components/schemas/EntityId",
|
|
6150
|
-
"readOnly": true
|
|
6151
|
-
},
|
|
6152
|
-
"_title": {
|
|
6153
|
-
"type": "string",
|
|
6154
|
-
"description": "The auto-generated title for the title",
|
|
6155
|
-
"readOnly": true
|
|
6156
|
-
},
|
|
6157
|
-
"_org": {
|
|
6158
|
-
"type": "string",
|
|
6159
|
-
"description": "Organization Id the entity belongs to",
|
|
6160
|
-
"readOnly": true
|
|
6161
|
-
},
|
|
6162
|
-
"_schema": {
|
|
6163
|
-
"type": "string",
|
|
6164
|
-
"enum": [
|
|
6165
|
-
"coupon"
|
|
6166
|
-
],
|
|
6167
|
-
"readOnly": true,
|
|
6168
|
-
"description": "The schema of the entity, for coupons it is always `coupon`"
|
|
6169
|
-
},
|
|
6170
|
-
"_tags": {
|
|
6171
|
-
"type": "array",
|
|
6172
|
-
"items": {
|
|
6173
|
-
"type": "string"
|
|
6174
|
-
}
|
|
6175
|
-
},
|
|
6176
|
-
"_created_at": {
|
|
6177
|
-
"type": "string",
|
|
6178
|
-
"format": "date-time",
|
|
6179
|
-
"readOnly": true,
|
|
6180
|
-
"description": "The creation date for the opportunity"
|
|
6181
|
-
},
|
|
6182
|
-
"_updated_at": {
|
|
6183
|
-
"type": "string",
|
|
6184
|
-
"format": "date-time",
|
|
6185
|
-
"readOnly": true,
|
|
6186
|
-
"description": "The date the coupon was last updated"
|
|
6187
|
-
},
|
|
6188
|
-
"name": {
|
|
6189
|
-
"type": "string",
|
|
6190
|
-
"nullable": true
|
|
6191
|
-
},
|
|
6192
|
-
"description": {
|
|
6193
|
-
"type": "string",
|
|
6194
|
-
"nullable": true
|
|
6195
|
-
},
|
|
6196
|
-
"type": {
|
|
6197
|
-
"type": "string",
|
|
6198
|
-
"enum": [
|
|
6199
|
-
"fixed",
|
|
6200
|
-
"percentage"
|
|
6201
|
-
]
|
|
6202
|
-
},
|
|
6203
|
-
"category": {
|
|
6204
|
-
"type": "string",
|
|
6205
|
-
"enum": [
|
|
6206
|
-
"discount",
|
|
6207
|
-
"cashback"
|
|
6208
|
-
]
|
|
6209
|
-
},
|
|
6210
|
-
"percentage_value": {
|
|
6211
|
-
"type": "string",
|
|
6212
|
-
"description": "Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.",
|
|
6213
|
-
"nullable": true
|
|
6214
|
-
},
|
|
6215
|
-
"fixed_value": {
|
|
6216
|
-
"description": "Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.",
|
|
6217
|
-
"type": "number"
|
|
6218
|
-
},
|
|
6219
|
-
"fixed_value_decimal": {
|
|
6220
|
-
"description": "Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.",
|
|
6221
|
-
"type": "string"
|
|
6222
|
-
},
|
|
6223
|
-
"fixed_value_currency": {
|
|
6224
|
-
"description": "Use if type is set to fixed. Three-letter ISO currency code, in lowercase.",
|
|
6225
|
-
"oneOf": [
|
|
6226
|
-
{
|
|
6227
|
-
"$ref": "#/components/schemas/Currency"
|
|
6228
|
-
}
|
|
6229
|
-
]
|
|
6230
|
-
},
|
|
6231
|
-
"cashback_period": {
|
|
6232
|
-
"type": "string",
|
|
6233
|
-
"description": "The cashback period, for now it's limited to either 0 months or 12 months",
|
|
6234
|
-
"enum": [
|
|
6235
|
-
"0",
|
|
6236
|
-
"12"
|
|
6237
|
-
],
|
|
6238
|
-
"nullable": true
|
|
6239
|
-
},
|
|
6240
|
-
"active": {
|
|
6241
|
-
"type": "boolean"
|
|
6242
|
-
},
|
|
6243
|
-
"requires_promo_code": {
|
|
6244
|
-
"type": "boolean",
|
|
6245
|
-
"description": "Whether the coupon requires a promo code to be applied"
|
|
6246
|
-
}
|
|
6247
|
-
}
|
|
6248
|
-
},
|
|
6249
|
-
"CouponWithoutPromoCodes": {
|
|
6250
6290
|
"allOf": [
|
|
6251
6291
|
{
|
|
6252
|
-
"$ref": "#/components/schemas/
|
|
6292
|
+
"$ref": "#/components/schemas/BaseCouponCommon"
|
|
6253
6293
|
}
|
|
6254
6294
|
]
|
|
6255
6295
|
},
|
|
@@ -6279,10 +6319,7 @@
|
|
|
6279
6319
|
}
|
|
6280
6320
|
},
|
|
6281
6321
|
"example": {
|
|
6282
|
-
"
|
|
6283
|
-
"code": "123456",
|
|
6284
|
-
"has_usage_limit": true,
|
|
6285
|
-
"usage_limit": 10
|
|
6322
|
+
"$ref": "#/components/examples/promo-code/value"
|
|
6286
6323
|
}
|
|
6287
6324
|
},
|
|
6288
6325
|
"RedeemedPromo": {
|
|
@@ -6716,6 +6753,112 @@
|
|
|
6716
6753
|
"pricing_details",
|
|
6717
6754
|
"_meta"
|
|
6718
6755
|
]
|
|
6756
|
+
},
|
|
6757
|
+
"ProductRecommendationSearch": {
|
|
6758
|
+
"description": "Product recommendations request payload",
|
|
6759
|
+
"type": "object",
|
|
6760
|
+
"properties": {
|
|
6761
|
+
"product_recommendation_ids": {
|
|
6762
|
+
"type": "array",
|
|
6763
|
+
"items": {
|
|
6764
|
+
"type": "string",
|
|
6765
|
+
"description": "Product recommendation id"
|
|
6766
|
+
}
|
|
6767
|
+
},
|
|
6768
|
+
"catalog_item": {
|
|
6769
|
+
"type": "object",
|
|
6770
|
+
"description": "The catalog item to be used as source for the recommendation",
|
|
6771
|
+
"properties": {
|
|
6772
|
+
"product_id": {
|
|
6773
|
+
"type": "string",
|
|
6774
|
+
"description": "Product id"
|
|
6775
|
+
},
|
|
6776
|
+
"price_id": {
|
|
6777
|
+
"type": "string",
|
|
6778
|
+
"description": "Product id"
|
|
6779
|
+
}
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6782
|
+
}
|
|
6783
|
+
},
|
|
6784
|
+
"ProductRecommendationResponse": {
|
|
6785
|
+
"description": "Product recommendations request payload",
|
|
6786
|
+
"type": "object",
|
|
6787
|
+
"properties": {
|
|
6788
|
+
"hits": {
|
|
6789
|
+
"type": "number",
|
|
6790
|
+
"description": "The number os results returned."
|
|
6791
|
+
},
|
|
6792
|
+
"results": {
|
|
6793
|
+
"type": "array",
|
|
6794
|
+
"items": {
|
|
6795
|
+
"$ref": "#/components/schemas/ProductRecommendation"
|
|
6796
|
+
}
|
|
6797
|
+
}
|
|
6798
|
+
}
|
|
6799
|
+
},
|
|
6800
|
+
"Offer": {
|
|
6801
|
+
"type": "object",
|
|
6802
|
+
"properties": {
|
|
6803
|
+
"product_id": {
|
|
6804
|
+
"type": "string"
|
|
6805
|
+
},
|
|
6806
|
+
"price_id": {
|
|
6807
|
+
"type": "string"
|
|
6808
|
+
},
|
|
6809
|
+
"target_id": {
|
|
6810
|
+
"type": "string"
|
|
6811
|
+
}
|
|
6812
|
+
}
|
|
6813
|
+
},
|
|
6814
|
+
"ProductRecommendation": {
|
|
6815
|
+
"allOf": [
|
|
6816
|
+
{
|
|
6817
|
+
"$ref": "#/components/schemas/EntityItem"
|
|
6818
|
+
}
|
|
6819
|
+
],
|
|
6820
|
+
"type": "object",
|
|
6821
|
+
"properties": {
|
|
6822
|
+
"source_price": {
|
|
6823
|
+
"type": "object",
|
|
6824
|
+
"description": "Price being used as source",
|
|
6825
|
+
"properties": {
|
|
6826
|
+
"$relation": {
|
|
6827
|
+
"type": "array",
|
|
6828
|
+
"items": {
|
|
6829
|
+
"$ref": "#/components/schemas/EntityRelation"
|
|
6830
|
+
}
|
|
6831
|
+
}
|
|
6832
|
+
}
|
|
6833
|
+
},
|
|
6834
|
+
"source_product": {
|
|
6835
|
+
"type": "object",
|
|
6836
|
+
"description": "Product being used as source",
|
|
6837
|
+
"properties": {
|
|
6838
|
+
"$relation": {
|
|
6839
|
+
"type": "array",
|
|
6840
|
+
"items": {
|
|
6841
|
+
"$ref": "#/components/schemas/EntityRelation"
|
|
6842
|
+
}
|
|
6843
|
+
}
|
|
6844
|
+
}
|
|
6845
|
+
},
|
|
6846
|
+
"type": {
|
|
6847
|
+
"type": "string",
|
|
6848
|
+
"description": "Type of product recommendation",
|
|
6849
|
+
"enum": [
|
|
6850
|
+
"change",
|
|
6851
|
+
"cross-sell",
|
|
6852
|
+
"up-sell"
|
|
6853
|
+
]
|
|
6854
|
+
},
|
|
6855
|
+
"offer": {
|
|
6856
|
+
"type": "array",
|
|
6857
|
+
"items": {
|
|
6858
|
+
"$ref": "#/components/schemas/Offer"
|
|
6859
|
+
}
|
|
6860
|
+
}
|
|
6861
|
+
}
|
|
6719
6862
|
}
|
|
6720
6863
|
},
|
|
6721
6864
|
"examples": {
|
|
@@ -8312,6 +8455,100 @@
|
|
|
8312
8455
|
}
|
|
8313
8456
|
]
|
|
8314
8457
|
}
|
|
8458
|
+
},
|
|
8459
|
+
"entity-item": {
|
|
8460
|
+
"value": {
|
|
8461
|
+
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
8462
|
+
"_org": "123",
|
|
8463
|
+
"_schema": "contact",
|
|
8464
|
+
"_tags": [
|
|
8465
|
+
"example",
|
|
8466
|
+
"mock"
|
|
8467
|
+
],
|
|
8468
|
+
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
8469
|
+
"_updated_at": "2021-02-09T12:41:43.662Z"
|
|
8470
|
+
}
|
|
8471
|
+
},
|
|
8472
|
+
"tax": {
|
|
8473
|
+
"value": {
|
|
8474
|
+
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
8475
|
+
"type": "VAT",
|
|
8476
|
+
"description": "Tax description",
|
|
8477
|
+
"active": "true",
|
|
8478
|
+
"region": "DE",
|
|
8479
|
+
"region_label": "Germany",
|
|
8480
|
+
"_org": "123",
|
|
8481
|
+
"_schema": "tax",
|
|
8482
|
+
"_tags": [
|
|
8483
|
+
"example",
|
|
8484
|
+
"mock"
|
|
8485
|
+
],
|
|
8486
|
+
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
8487
|
+
"_updated_at": "2021-02-09T12:41:43.662Z"
|
|
8488
|
+
}
|
|
8489
|
+
},
|
|
8490
|
+
"coupon-without-promo-codes": {
|
|
8491
|
+
"value": {
|
|
8492
|
+
"_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
8493
|
+
"_schema": "coupon",
|
|
8494
|
+
"_org": "org_12345",
|
|
8495
|
+
"_created_at": "2024-01-15T10:00:00.000Z",
|
|
8496
|
+
"_updated_at": "2024-01-20T12:00:00.000Z",
|
|
8497
|
+
"_title": "Sample Coupon",
|
|
8498
|
+
"name": "Sample Coupon",
|
|
8499
|
+
"type": "fixed",
|
|
8500
|
+
"fixed_value": 555,
|
|
8501
|
+
"fixed_value_currency": "USD",
|
|
8502
|
+
"fixed_value_decimal": "5.55",
|
|
8503
|
+
"active": true,
|
|
8504
|
+
"prices": {
|
|
8505
|
+
"$relation": [
|
|
8506
|
+
{
|
|
8507
|
+
"entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
8508
|
+
"_tags": [
|
|
8509
|
+
"discount",
|
|
8510
|
+
"special"
|
|
8511
|
+
],
|
|
8512
|
+
"_schema": "price"
|
|
8513
|
+
}
|
|
8514
|
+
]
|
|
8515
|
+
}
|
|
8516
|
+
}
|
|
8517
|
+
},
|
|
8518
|
+
"promo-code": {
|
|
8519
|
+
"value": {
|
|
8520
|
+
"id": "123e4567-e89b-12d3-a456-426614174000",
|
|
8521
|
+
"code": "123456",
|
|
8522
|
+
"has_usage_limit": true,
|
|
8523
|
+
"usage_limit": 10
|
|
8524
|
+
}
|
|
8525
|
+
},
|
|
8526
|
+
"price-input-mapping": {
|
|
8527
|
+
"value": {
|
|
8528
|
+
"price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
8529
|
+
"frequency_unit": "weekly",
|
|
8530
|
+
"value": 1000.245,
|
|
8531
|
+
"name": "avg consumption",
|
|
8532
|
+
"metadata": {
|
|
8533
|
+
"journey_title": "energy journey",
|
|
8534
|
+
"step_name": "avg consumption picker"
|
|
8535
|
+
}
|
|
8536
|
+
}
|
|
8537
|
+
},
|
|
8538
|
+
"external-fee-mapping": {
|
|
8539
|
+
"value": {
|
|
8540
|
+
"price_id": "589B011B-F8D9-4F8E-AD71-BACE4B543C0F",
|
|
8541
|
+
"frequency_unit": "weekly",
|
|
8542
|
+
"amount_total": 1000,
|
|
8543
|
+
"amount_total_decimal": "10.00"
|
|
8544
|
+
}
|
|
8545
|
+
},
|
|
8546
|
+
"external-fee-mappings": {
|
|
8547
|
+
"value": [
|
|
8548
|
+
{
|
|
8549
|
+
"$ref": "#/components/examples/external-fee-mapping"
|
|
8550
|
+
}
|
|
8551
|
+
]
|
|
8315
8552
|
}
|
|
8316
8553
|
}
|
|
8317
8554
|
}
|