forked from vtex/openapi-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VTEX - Pricing API.json
2188 lines (2188 loc) · 135 KB
/
VTEX - Pricing API.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.0",
"info": {
"title": "Pricing API",
"description": "Check the new [Pricing onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/pricing-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Pricing and is organized by focusing on the developer's journey.\r\n\r\nPricing is the VTEX module responsible for the SKU's price list. In this module, we have the base price of each SKU, optional fixed prices by trade policy, and rules that can be applied to dynamically generate different final prices according to the purchase context and the trade policy. \r\n\r\nFind more information on how to use this module and its business logic at our [Pricing onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/pricing-overview).\r\n\r\n## Rate limits per route\r\nThe rate limits per route revolve around the following values:\r\n\r\n\r\n| Operation | Rate | Burst credits |\r\n| - | - | - |\r\n| `GET` | No rate limits | No rate limits |\r\n| `POST` and `PUT` | 2000 per minute<br>33 per second | 500 |\r\n| `DELETE` | 1000 per minute<br>16 per second | 300 |\r\n\r\n### Burst credits\r\nIn case the account exceeds the limit frequency for a Rate Limiter (for instance, when one account makes 34 requests per second in any price insert/update route), we decrease from the Burst Credit count the exceeding (in this example, 1 Credit).\r\n\r\nIn the event of the Burst Credits reaching 0 (zero), the request is blocked with a Status 429 response.\r\n\r\nThe credits fill up over time when the route is not being used, at the same rate as the route's Rate Limiter. In our example, for each second not sending a PUT or POST request, we increase 40 Burst Credits to this Rate Limiter.\r\n\r\n### Response Headers for rate limits\r\nIn the response of any request to the Pricing API, there are headers indicating the current status of the Rate Limiting. This information may be useful to evaluate the ideal frequency to send requests to a route, and when to send a new request in the event of reaching a Rate Limit.\r\n\r\n- `Ratelimit-Limit`: Total Burst Credits offered to a route\r\n- `Ratelimit-Remaining`: How many Burst Credits are still available to use\r\n- `Ratelimit-Reset`: How long (in seconds) it will take for Burst Credits to fill up completely (it will fill up to the *Ratelimit-Limit*)\r\n- `Retry-After`: Indicates how many seconds you will need to wait until the Rate Limiter accepts a new request to this route again. If this header response exists, this means your current request has been rate-limited and has not been processed.\r\n\r\n\r\n### Integrating with Pricing v2 considering rate limits\r\nWhen developing an integration, consider the requests/route/account limits specified in the [Rate Limits per route](#rate-limits-per-route) section, and avoid surpassing this frequency.\r\n\r\nIf you happen to be rate limited, please await the time in seconds specified in `Retry-After` before making another request to the service, and reduce the rate of requests per second that your integration is making.\r\n\r\n\r\n\r\n## Index\r\n\r\n### Prices and Fixed Prices\r\n- `GET` [Get Price](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/prices/-itemId-)\r\n- `DELETE` [Delete Price](https://developers.vtex.com/docs/api-reference/pricing-api/#delete-/pricing/prices/-itemId-)\r\n- `PUT` [Create or Update Base Price or Fixed Prices](https://developers.vtex.com/docs/api-reference/pricing-api/#put-/pricing/prices/-itemId-)\r\n- `GET` [Get Fixed Prices](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/prices/-itemId-/fixed)\r\n- `POST` [Create or Update Fixed Prices on a price table or trade policy](https://developers.vtex.com/docs/api-reference/pricing-api/#post-/pricing/prices/-itemId-/fixed/-priceTableId-)\r\n- `GET` [Get Fixed Prices on a price table policy](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/prices/-itemId-/fixed/-priceTableId-)\r\n- `DELETE` [Delete Fixed Prices on a price table or trade policy](https://developers.vtex.com/docs/api-reference/pricing-api/#delete-/pricing/prices/-itemId-/fixed/-priceTableId-)\r\n- `GET` [GET Computed Price by price table or trade policy](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/prices/-itemId-/computed/-priceTableId-)\r\n\r\n\r\n### Pricing Configuration\r\n- `GET` [Get Pricing Configuration](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/config)\r\n- `GET` [Get Pricing v2 Status](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/migration)\r\n\r\n\r\n### Price Tables\r\n- `GET` [Get rules for a price table](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/pipeline/catalog/-priceTableId-)\r\n- `PUT` [Update rules for a price table](https://developers.vtex.com/docs/api-reference/pricing-api/#put-/pricing/pipeline/catalog/-priceTableId-)\r\n- `GET` [Get all price tables and their rules](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/pipeline/catalog)\r\n- `GET` [List price tables](https://developers.vtex.com/docs/api-reference/pricing-api/#get-/pricing/tables)\r\n\n## Common parameters in the documentation\r\n\r\n| Parameter name | Description |\r\n| - | - |\r\n| `{{accountName}}` | Store account name. |\r\n| `{{environment}}` | The environment that will be called. |\r\n| `{{X-VTEX-API-AppKey}}` | Located in the headers of the requests, user authentication key. |\r\n| `{{X-VTEX-API-AppToken}}` | Located in the headers of the requests, authentication password. |",
"contact": {},
"version": "1.0"
},
"servers": [
{
"url": "https://api.vtex.com/{accountName}",
"description": "VTEX server URL.",
"variables": {
"accountName": {
"description": "Name of the VTEX account. Used as part of the URL",
"default": "apiexamples"
}
}
}
],
"paths": {
"/pricing/prices/{itemId}": {
"get": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Get price by SKU ID",
"description": "Retrieves price data given a specific SKU ID. Within the `fixedPrices` object, there might be a list of prices for specific Trade Policies and Minimium Quantities of the SKU. Fixed Prices may also be scheduled.\r\n\r\n\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Read prices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetPrice",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU ID.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Getprice"
},
"example": {
"itemId": "1234512354",
"listPrice": 300,
"costPrice": 10,
"markup": 2400,
"basePrice": 250,
"fixedPrices": [
{
"tradePolicyId": "1",
"value": 666.66,
"listPrice": null,
"minQuantity": 1
},
{
"tradePolicyId": "9",
"value": 4500,
"listPrice": null,
"minQuantity": 1
},
{
"tradePolicyId": "9",
"value": 600,
"listPrice": null,
"minQuantity": 1,
"dateRange": {
"from": "2017-12-07T14:30:00Z",
"to": "2017-12-30T14:30:00Z"
}
},
{
"tradePolicyId": "9",
"value": 5555.55,
"listPrice": null,
"minQuantity": 1,
"dateRange": {
"from": "2017-12-20T14:30:00Z",
"to": "2017-12-22T14:30:00Z"
}
},
{
"tradePolicyId": "9",
"value": 555.55,
"listPrice": null,
"minQuantity": 1,
"dateRange": {
"from": "2017-12-06T15:00:00Z",
"to": "2017-12-14T15:00:00Z"
}
},
{
"tradePolicyId": "10",
"value": 5555.55,
"listPrice": null,
"minQuantity": 1
},
{
"tradePolicyId": "18",
"value": 555.55,
"listPrice": null,
"minQuantity": 1
}
]
}
}
}
}
},
"deprecated": false
},
"delete": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Delete price all base and fixed prices of an SKU",
"description": "Deletes the Base Price and all available Fixed Prices for an SKU in all trade policies.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Delete all prices from account** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "DeletePrice",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU ID.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
}
],
"responses": {
"200": {
"description": "OK"
}
},
"deprecated": false
},
"put": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Create or update base price or fixed prices",
"description": "Creates or updates an SKU Base Price or Fixed Prices. The **base price** is the basic selling price of a product, it comprises the cost price and the markup wanted in the sale of the product. The **fixed price** is an optional price of the SKU for a specific trade policy with a specific minimum quantity to be activated.\r\n\r\nYou may optionally set a list price. Additionally, you may set either a cost price or a markup value. By defining either one of them, the other will be calculated to conform to the formula`costPrice * (1 + markup) = basePrice`.\r\n\r\n\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Modify prices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "CreateUpdatePriceOrFixedPrice",
"parameters": [
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
},
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU unique identifier number.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"markup",
"basePrice",
"listPrice"
],
"properties": {
"markup": {
"type": "integer",
"description": "The profit percentage that is to be obtained from the sale of that SKU. If you decide to fill the `markup` item, you must also fill the `costPrice`. The `basePrice` will be automatically generated based on both values.",
"example": 30
},
"listPrice": {
"type": "number",
"description": "SKU's suggested selling price.",
"example": 50.00
},
"basePrice": {
"type": "number",
"description": "SKU selling base price. If you decide to fill only the `basePrice` item, the `markup` and `costPrice` will be automatically generated to adapt to the number inserted in `basePrice`.",
"example": 100.00
},
"costPrice": {
"type": "number",
"description": "SKU selling cost price. If you decide to fill the `costPrice` item, you must also fill the `markup` and `basePrice` will be automatically generated based on both values.",
"example": 35.00
},
"fixedPrices": {
"type": "array",
"description": "Information about the SKU's fixed prices.",
"items": {
"description": "Array with general information about the SKU's fixed prices.",
"type": "object",
"required": [
"minQuantity",
"value",
"tradePolicyId"
],
"properties": {
"tradePolicyId": {
"type": "string",
"description": "Trade policy name or ID that will have the fixed price configured.",
"example": "1"
},
"value": {
"type": "number",
"description": "Fixed price value.",
"example": 50.50
},
"listPrice": {
"type": "number",
"description": "SKU List Fixed Price.",
"example": 50.50
},
"minQuantity": {
"type": "integer",
"description": "Minimum quantity of the SKU for the fixed price to be applied.",
"example": 2
},
"dateRange": {
"type": "object",
"description": "Period of time when the fixed price will be applied to the SKU.",
"required": [
"from",
"to"
],
"properties": {
"from": {
"type": "string",
"description": "Start date of the price. This date follows the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format, which includes the time zone.",
"example": "2021-12-30T22:00:00-03:00"
},
"to": {
"type": "string",
"description": "End date of the price. This date follows the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format, which includes the time zone.",
"example": "2021-12-30T22:00:00-03:00"
}
}
}
}
}
}
}
},
"example": {
"markup": 30,
"listPrice": 50.00,
"basePrice": 100.00,
"costPrice": 35.00,
"fixedPrices": [
{
"tradePolicyId": "1",
"value": 50.50,
"listPrice": 50.50,
"minQuantity": 2,
"dateRange": {
"from": "2021-12-30T22:00:00-03:00",
"to": "2021-12-30T22:00:00-03:00"
}
}
]
}
}
}
},
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/pricing/prices/{itemId}/fixed": {
"get": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Get fixed prices",
"description": "The **fixed price** is an optional price of the SKU for a specific trade policy with a specific minimum quantity to be activated. This method retrieves an array of Fixed Prices for an SKU in a Trade Policy with Minimum Quantities.\r\n\r\nThe default value for a Minimum Quantity is `1`. This means a Fixed Price will be valid for a SKU in a Trade Policy for orders containing the specified number of Minimum Quantity or above, unless a higher Minimum Quantity is specified.\r\n\r\nFixed prices may, optionally, be scheduled. If so, these objects will contain the `dateRange` object with `from` and `to` properties, indicating the start and end time of the scheduled fixed price in the RFC3339 timestamp format (`YYYY-MM-DDT23:59:60Z`).\r\n\r\n Note that the 'Z', at the end, represents the UTC time (GMT+00:00). If it was in GMT-03:00, for example, it would be (`YYYY-MM-DDT23:59:60-03:00`).\r\n\r\n\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Read prices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetFixedPrices",
"parameters": [
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
},
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU ID.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FixedPrice"
}
},
"example": [
{
"tradePolicyId": "6",
"value": 20.9,
"listPrice": 22.9,
"minQuantity": 1,
"dateRange": {
"from": "2021-12-30T22:00:00-03:00",
"to": "2021-12-30T22:00:00-03:00"
}
},
{
"tradePolicyId": "1",
"value": 18.9,
"listPrice": null,
"minQuantity": 1,
"dateRange": {
"from": "2021-12-30T22:00:00-03:00",
"to": "2021-12-30T22:00:00-03:00"
}
}
]
}
}
}
},
"deprecated": false
}
},
"/pricing/prices/{itemId}/fixed/{priceTableId}": {
"post": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Create or update fixed prices on a price table or trade policy",
"description": "Creates or updates the fixed prices of an SKU for a specific price table or trade policy. You can add one or multiple fixed prices per SKU.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Modify prices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n> \u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "createorupdatefixedpricesonpricetableortradepolicy",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU ID.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "priceTableId",
"in": "path",
"description": "SKU **price table** name or **trade policy** ID.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "priceTableA"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"description": "Information about prices and fixed prices.",
"required": [
"value",
"minQuantity"
],
"properties": {
"value": {
"type": "number",
"description": "Fixed price value.",
"example": 50.50
},
"listPrice": {
"type": "number",
"description": "SKU List Fixed Price.",
"example": 50.50
},
"minQuantity": {
"type": "integer",
"description": "The minimum SKU quantity for the fixed price to be applied.",
"example": 2
},
"dateRange": {
"type": "object",
"description": "Period of time when the fixed price will be applied to the SKU.",
"required": [
"from",
"to"
],
"properties": {
"from": {
"type": "string",
"description": "Start date of the price. This date follows the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format, which includes the time zone.",
"example": "2021-12-30T22:00:00-03:00"
},
"to": {
"type": "string",
"description": "End date of the price. This date follows the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format, which includes the time zone.",
"example": "2021-12-30T22:00:00-04:00"
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK"
}
},
"deprecated": false
},
"get": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Get fixed prices on a price table or trade policy",
"description": "Retrieves all Fixed Prices on a price table or trade policy. \r\n\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Read prices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetFixedPricesonapricetable",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU ID.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "priceTableId",
"in": "path",
"description": "Price Table Name",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "gold"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json; charset=utf-8": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FixedPrice"
}
},
"example": [
{
"tradePolicyId": "6",
"value": 20.9,
"listPrice": 22.9,
"minQuantity": 1,
"dateRange": {
"from": "2021-12-30T22:00:00-03:00",
"to": "2021-12-30T22:00:00-04:00"
}
},
{
"tradePolicyId": "1",
"value": 18.9,
"listPrice": null,
"minQuantity": 1
}
]
}
}
}
},
"deprecated": false
},
"delete": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Delete fixed prices on a price table or trade policy",
"description": "Deletes all Fixed Prices of an SKU in a specific Price Table or Trade Policy.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Delete all prices from account** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "Deletefixedpricesonapricetableortradepolicy",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU ID.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "priceTableId",
"in": "path",
"description": "Price Table or Trade Policy Name.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "gold"
}
}
],
"responses": {
"200": {
"description": "OK"
}
},
"deprecated": false
}
},
"/pricing/prices/{itemId}/computed/{priceTableId}": {
"get": {
"tags": [
"Prices and Fixed Prices"
],
"summary": "Get computed price by price table or trade policy",
"description": "Gets the Computed Price, which is the price after all the steps in the Pricing pipeline, for an SKU in a specific price table or trade policy. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint: \r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Read prices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetComputedPricebypricetable",
"parameters": [
{
"name": "categoryIds",
"in": "query",
"description": "Category ID.",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "brandId",
"in": "query",
"description": "Brand ID.",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "integer",
"example": 3
}
},
{
"name": "quantity",
"in": "query",
"description": "SKU quantity.",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "integer",
"example": 2
}
},
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
},
{
"name": "itemId",
"in": "path",
"description": "SKU ID.",
"required": true,
"style": "simple",
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "priceTableId",
"in": "path",
"description": "SKU Price Table Name.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "gold"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/Getcomputedprice"
},
"example": {
"tradePolicyId": "1",
"listPrice": 30,
"costPrice": 76.92,
"sellingPrice": 18.9,
"priceValidUntil": "2018-12-20T18:12:14Z"
}
}
}
}
},
"deprecated": false,
"servers": [
{
"url": "https://api.vtex.com/{account}/pricing",
"variables": {
"account": {
"default": "DefaultParameterValue"
}
}
}
]
}
},
"/pricing/config": {
"get": {
"tags": [
"Pricing Configuration"
],
"summary": "Get pricing configuration",
"description": "Retrieves Pricing configuration.\r\n\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Pricing | Price List | **Read prices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetPricingConfig",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "Describes the type of the content being sent.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"default": "application/json"
}
},
{
"name": "Accept",
"in": "header",
"description": "HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"Access-Control-Allow-Credentials": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "true"
}
}
},
"Access-Control-Allow-Origin": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "*"
}
}
},
"Connection": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "keep-alive"
}
}
},
"Content-Encoding": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "gzip"
}
}
},
"Content-Length": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "118"
}
}
},
"Date": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "Tue, 21 Feb 2017 16:11:39 GMT"
}
}
},
"Server": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "nginx"
}
}
},
"X-CDNIgnore": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "1"
}
}
},
"X-Powered-by-VTEX-Janus-Edge": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "v1.35.3"
}
}
},
"X-Track": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "stable"
}
}
},
"X-VTEX-Janus-Router-Backend-App": {
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"example": "pricing-v3.21.12"
}
}
}
},
"content": {
"application/json; charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/PricingConfiguration"
},
"example": {
"hasMigrated": true,
"migrationStatus": "Completed",
"defaultMarkup": 100,
"priceVariation": {
"upperLimit": null,
"lowerLimit": null
},
"minimumMarkups": {
"1": 100,
"2": 90
},
"tradePolicyConfigs": [],
"sellersToOverride": [],
"hasPriceInheritance": false,
"priceInheritance": "never",
"hasOptionalBasePrice": false,
"blockAccount": false,
"blockedRoutes": null,
"priceTableSelectionStrategy": "first",
"priceTableLimit": null
}
}
}
}
},
"deprecated": false,
"servers": [
{
"url": "https://api.vtex.com/{account}/pricing",
"variables": {