-
Notifications
You must be signed in to change notification settings - Fork 133
/
VTEX - Marketplace Protocol - External Marketplace Orders.json
4145 lines (4144 loc) · 287 KB
/
VTEX - Marketplace Protocol - External Marketplace Orders.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": "Marketplace Protocol",
"description": "The _Marketplace Protocol_ is a set of API requests and definitions to help you integrate external sellers into a VTEX marketplace as well as external marketplaces into VTEX sellers.\r\n\r\n## External Seller\r\n\r\nHere you will find the endpoints involved in the integration between a VTEX marketplace and an external seller. Note that some of these requests are typically sent by the seller while others are received.\r\n\r\n| **Request** | **From** | **To** |\r\n|-|-|-|\r\n| [Fulfillment simulation](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-seller-fulfillment#post-/pvt/orderForms/simulation) | Marketplace | Seller |\r\n| [Order placement](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-seller-fulfillment#post-/pvt/orders) | Marketplace | Seller |\r\n| [Authorize fulfillment](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-seller-fulfillment#post-/pvt/orders/-sellerOrderId-/fulfill) | Marketplace | Seller |\r\n| [Marketplace order cancellation](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-seller-fulfillment#post-/pvt/orders/-orderId-/cancel) | Marketplace | Seller |\r\n| [Send invoice](https://developers.vtex.com/docs/api-reference/marketplace-protocol#post-/pvt/orders/-marketplaceOrderId-/invoice) | Seller | Marketplace |\r\n| [Send tracking information](https://developers.vtex.com/docs/api-reference/marketplace-protocol#post-/pvt/orders/-marketplaceOrderId-/invoice/-invoiceNumber-) | Seller | Marketplace |\r\n| [Update tracking status](https://developers.vtex.com/docs/api-reference/marketplace-protocol#post-/pvt/orders/-marketplaceOrderId-/invoice/-invoiceNumber-/tracking) | Seller | Marketplace |\r\n| [Cancel order in marketplace](https://developers.vtex.com/docs/api-reference/marketplace-protocol#post-/pvt/orders/-marketplaceOrderId-/cancel) | Seller | Marketplace |\r\n\r\nFor a detailed explanation of the steps required to develop a custom connector to sell products from an external seller in your storefront, check out our complete [External Seller Integration Guide](https://developers.vtex.com/docs/guides/external-seller-integration-guide).\r\n\r\n\r\n## External Marketplace\r\n\r\nIn this section, you will find the endpoints involved in the VTEX integration between an external marketplace and a VTEX seller.\r\n\r\n\r\n| **Request** | **From** | **To** |\r\n|-|-|-|\r\n| [VTEX Mapper Registration](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-marketplace-mapper#post-/api/mkp-category-mapper/connector/register) | External marketplace | VTEX system |\r\n| [Send Category Mapping to VTEX Mapper](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-marketplace-mapper#post-/api/mkp-category-mapper/categories/marketplace/-id-) | External marketplace | VTEX system |\r\n| [New Order Integration](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-marketplace-orders#post-/api/order-integration/orders) | External marketplace | VTEX system |\r\n| [Update Order Status](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-marketplace-orders#put-/api/order-integration/orders/status) | External marketplace | VTEX system |\r\n| [Fulfillment simulation - External Marketplace](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-marketplace-orders#post-/api/checkout/pub/orderForms/simulation) | External marketplace | VTEX system |\r\n| [Place fulfillment order](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-marketplace-orders#post-/api/fulfillment/pvt/orders) | External marketplace | VTEX Seller |\r\n| [Authorize dispatch for fulfillment order](https://developers.vtex.com/docs/api-reference/marketplace-protocol-external-marketplace-orders#post-/api/fulfillment/pvt/orders/-orderId-/fulfill) | External marketplace | VTEX Seller |\r\n\r\n\r\nFor a detailed explanation of the steps required to develop a custom connector to become an external marketplace for VTEX sellers, check out our complete [External Marketplace Integration Guide](https://developers.vtex.com/docs/guides/external-marketplace-integration-guide).",
"contact": {},
"version": "1.0"
},
"servers": [
{
"url": "https://{accountName}.{environment}.com.br",
"description": "VTEX Server URL.",
"variables": {
"accountName": {
"description": "Name of the VTEX account. Used as part of the URL.",
"default": "apiexamples"
},
"environment": {
"description": "Environment to use. Used as part of the URL.",
"enum": [
"vtexcommercestable"
],
"default": "vtexcommercestable"
}
}
}
],
"paths": {
"/api/fulfillment/pvt/orders": {
"post": {
"tags": [
"External Marketplace"
],
"summary": "Place fulfillment order",
"description": "Creates fulfillment order, meaning that it is an order for the seller's side in a sale made through a marketplace. This order assumes the transaction itself has already happened on the marketplace's side and, therfore, cares only about the fulfillment side.\n\r\n\r> If you plan to integrate external orders with possible [Price divergence](https://help.vtex.com/en/tutorial/price-divergence-rule--6RlFLhD1rIRRshl83KnCjW#) be mindful of the `isCreatedAsync` request body field. \n\nFor a detailed explanation of the steps required to develop a custom connector to become an external marketplace for VTEX sellers, check out our complete [External Marketplace Integration Guide](https://developers.vtex.com/vtex-rest-api/docs/external-marketplace-integration-guide). \r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed.",
"operationId": "PlaceFulfillmentOrder",
"parameters": [
{
"name": "accountName",
"in": "path",
"required": true,
"description": "Name of the VTEX account. Used as part of the URL.",
"schema": {
"type": "string",
"default": "apiexamples"
}
},
{
"name": "environment",
"in": "path",
"required": true,
"description": "Environment to be used. It is passed as part of the URL.",
"schema": {
"type": "string",
"default": "vtexcommercestable"
}
},
{
"name": "Content-Type",
"in": "header",
"description": "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": "sc",
"in": "query",
"description": "Sales channel.",
"required": false,
"style": "form",
"schema": {
"type": "string",
"example": "1"
}
},
{
"name": "affiliateId",
"in": "query",
"description": "ID identifying the marketplace where the order originates. This ID is configured in the seller's VTEX account, and should be informed to the marketplace.",
"required": true,
"style": "form",
"schema": {
"type": "string",
"example": "MKP"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/placeFulfillmentOrderRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/placeFulfillmentOrderResponse"
},
"example": {
"orderId": "1234567890",
"status": "success",
"message": "Order placed successfully",
"orderData": {
"marketplaceOrderId": "123456789",
"marketplaceServicesEndpoint": "https://exampleseller.marketplaceservices.com",
"marketplacePaymentValue": 100,
"isCreatedAsync": false,
"items": [
{
"id": "123456789",
"quantity": 1,
"seller": "1",
"commission": 10,
"freightCommission": 10,
"price": 2499,
"bundleItems": [],
"itemAttachment": {
"name": "name-example",
"content": "content-example"
},
"attachments": [],
"priceTags": [],
"measurementUnit": "g",
"unitMultiplier": 1,
"isGift": false
}
],
"clientProfileData": {
"email": "[email protected]",
"firstName": "first-name",
"lastName": "last-name",
"documentType": "cpf",
"document": "123456789",
"phone": "+55110988887777",
"corporateName": "company-name",
"tradeName": "trade-name",
"corporateDocument": "12345678000100",
"stateInscription": "12345678",
"corporatePhone": "+551100988887777",
"isCorporate": false
},
"shippingData": {
"address": {
"addressType": "residential",
"receiverName": "receiver-name",
"addressId": "Home",
"postalCode": "12345000",
"city": "Rio de Janeiro",
"state": "Rio de Janeiro",
"country": "BRA",
"street": "Praia de Botafogo",
"number": "300",
"neighborhood": "Botafogo",
"complement": "3rd floor",
"reference": "Grey building",
"geoCoordinates": [
"00.00000",
"00.00000"
]
},
"logisticsInfo": [
{
"itemIndex": 0,
"selectedSla": "Express",
"lockTTL": "8d",
"shippingEstimate": "7d",
"price": 1099,
"deliveryWindow": {
"startDateUtc": "2023-01-01 00:00:00",
"endDateUtc": "2023-01-02 00:00:00",
"price": 0,
"lisPrice": 0,
"tax": 0
}
}
],
"updateStatus": "updated"
},
"paymentData": "credit card",
"marketingData": {
"utmSource": "Facebook",
"utmMedium": "CPC",
"utmCampaign": "Black friday",
"utmiPage": "utmi_page-example",
"utmiPart": "utmi_part-example",
"utmiCampaign": "utmi_campaign-example"
},
"openTextField": "open-text-example"
}
}
}
}
}
},
"deprecated": false
}
},
"/api/fulfillment/pvt/orders/{orderId}/fulfill": {
"post": {
"tags": [
"External Marketplace"
],
"summary": "Authorize dispatch for fulfillment order",
"description": "Creates fulfillment order, meaning that it is an order for the seller's side in a sale made through a marketplace. This order assumes the transaction itself has already happened on the marketplace's side and, therfore, cares only about the fulfillment side. \n\nFor a detailed explanation of the steps required to develop a custom connector to become an external marketplace for VTEX sellers, check out our complete [External Marketplace Integration Guide](https://developers.vtex.com/vtex-rest-api/docs/external-marketplace-integration-guide).\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed.",
"operationId": "AuthorizeDispatchForFulfillmentOrder",
"parameters": [
{
"name": "accountName",
"in": "path",
"required": true,
"description": "Name of the VTEX account. Used as part of the URL.",
"schema": {
"type": "string",
"default": "apiexamples"
}
},
{
"name": "environment",
"in": "path",
"required": true,
"description": "Environment to be used. It is passed as part of the URL.",
"schema": {
"type": "string",
"default": "vtexcommercestable"
}
},
{
"name": "orderId",
"in": "path",
"required": true,
"description": "ID of the order that is to be authorized. It is composed of the `afilliateId` and the `marketplaceOrderId` joined with a `-`. For instance, an order with an ID `\"123\"` coming from the marketplace `\"MKP\"` has an `orderId` of `\"MKP-123\"`.",
"schema": {
"type": "string",
"default": "MKP-123"
}
},
{
"name": "Content-Type",
"in": "header",
"description": "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": "sc",
"in": "query",
"description": "Sales channel.",
"required": false,
"style": "form",
"schema": {
"type": "string",
"example": "1"
}
},
{
"name": "affiliateId",
"in": "query",
"description": "ID identifying the marketplace where the order originates. This ID is configured in the seller's VTEX account, and should be informed to the marketplace.",
"required": true,
"style": "form",
"schema": {
"type": "string",
"example": "MKP"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"marketplaceOrderId": {
"type": "string",
"description": "ID of the order in the marketplace. It is the same as the `orderId` without the `afilliateId` at the beginning. For instance, if the `orderId` is `\"MKP-123\"`, the `marketplaceOrderId` is `\"123\"`.",
"example": "123"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/orderIDFulfillmentResponse"
},
"example": {
"status": "success",
"message": "Order created successfully",
"orderId": "123",
"details": {
"createdAt": "2024-07-04T12:34:56Z",
"marketplaceOrderId": "123",
"status": "pending"
}
}
}
}
}
},
"deprecated": false
}
},
"/api/order-integration/orders": {
"post": {
"tags": [
"External Marketplace"
],
"summary": "New Order Integration",
"description": "API to integrate an external channel's order into the VTEX plataform.\n\nThis process is asynchronous and a notification with the order's integration results will be sent to the endpoint specified in the **connectorEndpoint** field in [App Template](https://developers.vtex.com/vtex-rest-api/docs/external-marketplace-integration-app-template), if the connector uses our App template. The field **connectorName** is also optional for connectors that use our App Template and authenticate using the app's auth cookie. If the account is not informed in the URL host, it should also be defined as a query string parameter in the route: `an={account}`. \n\nFor a detailed explanation of the steps required to develop a custom connector to become an external marketplace for VTEX sellers, check out our complete [External Marketplace Integration Guide](https://developers.vtex.com/vtex-rest-api/docs/external-marketplace-integration-guide).\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed.",
"operationId": "EnqueueNewOrder",
"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": "an",
"in": "query",
"description": "Parameter should indicate the name of the VTEX account where the order is being integrated or updated, meaning the seller responsible for the order.",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"example": "apiexamples"
}
},
{
"name": "accountName",
"in": "path",
"required": true,
"description": "Parameter should indicate the name of the VTEX account where the order is being integrated or updated, meaning the seller responsible for the order.",
"schema": {
"type": "string",
"default": "apiexamples"
}
},
{
"name": "affiliateId",
"in": "query",
"description": "ID identifying the marketplace where the order originates. This ID is configured in the seller's VTEX account, and should be informed to the marketplace.",
"required": true,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"example": "MKP"
}
}
],
"requestBody": {
"description": "Request body containing data to enqueue a new order.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EnqueueNewOrderRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Deliverybyseller"
},
"example": {
"marketplaceOrderId": null,
"accountName": "grocery1",
"code": "SOI003",
"flow": "PlaceOrder",
"success": true,
"operationId": null,
"errors": null,
"fields": null,
"message": "Order successfully enqueued"
}
}
}
},
"default": {
"description": "Default response for successful order enqueue operation.",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Deliverybyfranchiseseller"
},
"example": {
"marketplaceOrderId": null,
"accountName": "grocery1",
"code": "SOI003",
"flow": "PlaceOrder",
"success": true,
"operationId": null,
"errors": null,
"fields": null,
"message": "Order successfully enqueued"
}
}
}
}
},
"deprecated": false
}
},
"/api/order-integration/orders/status": {
"put": {
"tags": [
"External Marketplace"
],
"summary": "Update Order Status",
"description": "API request used to update an order status in VTEX.\n\nThis process is asynchronous and a notification with the order's integration results will be sent to the endpoint specified in the **connectiorEndpoint** field or the **connectiorEndpoint** [App Template](https://developers.vtex.com/vtex-rest-api/docs/external-marketplace-integration-app-template), if the connector uses our App template. The field **connectorName** is also optional for connectors that use our App Template and authenticate using the app's auth cookie. \n\nFor a detailed explanation of the steps required to develop a custom connector to become an external marketplace for VTEX sellers, check out our complete [External Marketplace Integration Guide](https://developers.vtex.com/vtex-rest-api/docs/external-marketplace-integration-guide).\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed.",
"operationId": "UpdateOrderStatus",
"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": "an",
"in": "query",
"description": "Parameter should indicate the name of the VTEX account where the order is being integrated or updated, meaning the seller responsible for the order.",
"required": false,
"style": "form",
"explode": true,
"schema": {
"type": "string",
"example": "apiexamples"
}
},
{
"name": "accountName",
"in": "path",
"required": true,
"description": "Parameter should indicate the name of the VTEX account where the order is being integrated or updated, meaning the seller responsible for the order.",
"schema": {
"type": "string",
"default": "apiexamples"
}
}
],
"requestBody": {
"description": "Request body containing data to update the order status.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateOrderStatusRequest"
},
"example": {
"marketplaceOrderId": "{{$guid}}",
"marketplaceOrderStatus": "approved",
"connectorName": "Skyhub",
"connectorEndpoint": "https://connector-endpoint.com/api/vtex"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Approveorder"
},
"example": {
"marketplaceOrderId": "7e62fcd3-827b-400d-be8a-f050a79c4976",
"accountName": null,
"code": "SOI003",
"flow": "ApproveOrder",
"success": true,
"operationId": null,
"errors": null,
"fields": null,
"message": "Order successfully enqueued"
}
}
}
}
},
"deprecated": false
}
},
"/api/checkout/pub/orderForms/simulation": {
"post": {
"tags": [
"External Marketplace"
],
"summary": "Fulfillment simulation - external marketplace",
"description": "This endpoint can be triggered by marketplaces to simulate the fulfillment of an item in the cart.\r\n\r\nThe fulfillment information is useful whenever you need to know the availability of fulfilling an order for a specific cart setting, since the API response will let you know the updated price, inventory and shipping data.\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed.",
"operationId": "fulfillment-simulation-external-marketplace",
"parameters": [
{
"name": "accountName",
"in": "path",
"required": true,
"description": "Name of the VTEX account. Used as part of the URL.",
"schema": {
"type": "string",
"default": "apiexamples"
}
},
{
"name": "environment",
"in": "path",
"required": true,
"description": "Environment to be used. It is passed as part of the URL.",
"schema": {
"type": "string",
"default": "vtexcommercestable"
}
},
{
"name": "Content-Type",
"in": "header",
"description": "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": "affiliateId",
"in": "query",
"description": "The affiliate ID code created by the seller.",
"required": false,
"style": "form",
"schema": {
"type": "string",
"default": "MNF"
}
},
{
"name": "sc",
"in": "query",
"description": "Trade Policy (Sales Channel) identification.",
"required": false,
"style": "form",
"schema": {
"type": "integer",
"example": 1
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"quantity",
"seller"
],
"description": "An object representing a single SKU inside the cart, detailing its ID, quantity, and the seller responsible.",
"properties": {
"items": {
"type": "array",
"description": "Array containing information about the SKUs inside the cart to be simulated.",
"items": {
"type": "object",
"description": "Array containing information about the SKUs inside the cart to be simulated.",
"properties": {
"id": {
"type": "string",
"description": "The SKU ID.",
"example": "1"
},
"quantity": {
"type": "integer",
"format": "int32",
"description": "The quantity of items of this specific SKU in the cart to be simulated.",
"example": 1
},
"seller": {
"type": "string",
"description": "The ID of the seller responsible for this SKU. This ID can be found in your VTEX Admin.",
"example": "1"
}
}
}
},
"marketingData": {
"type": "object",
"description": "Object containing promotion data such as coupon tracking information and internal or external UTMs.",
"properties": {
"coupon": {
"type": "string",
"description": "Sending an existing coupon code in this field will return the corresponding discount in the purchase. Use the [cart simulation](https://developers.vtex.com/vtex-rest-api/reference/orderform#orderformsimulation) request to check which coupons might apply before placing the order.",
"example": "free-shipping"
},
"utmSource": {
"type": "string",
"description": "UTM source.",
"example": "Facebook"
},
"utmMedium": {
"type": "string",
"description": "UTM medium.",
"example": "CPC"
},
"utmCampaign": {
"type": "string",
"description": "UTM campaign.",
"example": "Black friday"
},
"utmiPage": {
"type": "string",
"description": "utmi_page (internal utm).",
"example": "utmi_page-example"
},
"utmiPart": {
"type": "string",
"description": "utmi_part (internal utm).",
"example": "utmi_part-example"
},
"utmiCampaign": {
"type": "string",
"description": "utmi_campaign (internal utm).",
"example": "utmi_campaign-example"
}
}
},
"postalCode": {
"type": "string",
"description": "Postal code.",
"example": "12345-000"
},
"country": {
"type": "string",
"description": "Three letter ISO code of the country of the shipping address. This value must be sent along with the `postalCode` or `geoCoordinates` values.",
"example": "BRA"
},
"selectedSla": {
"type": "string",
"description": "SLA selected by the customer.",
"example": "Normal"
},
"clientProfileData": {
"type": "object",
"description": "Customer's profile information.",
"properties": {
"email": {
"type": "string",
"description": "Email address.",
"example": "[email protected]"
},
"firstName": {
"type": "string",
"description": "First name.",
"example": "Clark"
},
"lastName": {
"type": "string",
"description": "Last name.",
"example": "Kent"
},
"documentType": {
"type": "string",
"description": "Type of the document informed by the customer.",
"example": "cpf"
},
"document": {
"type": "string",
"description": "Document informed by the customer.",
"example": "12345678900"
},
"phone": {
"type": "string",
"description": "Phone number.",
"example": "+552199999999"
},
"corporateName": {
"type": "string",
"description": "Company name, if the customer is a legal entity.",
"nullable": true,
"example": "companyName"
},
"tradeName": {
"type": "string",
"description": "Trade name, if the customer is a legal entity.",
"nullable": true,
"example": "tradeName"
},
"corporateDocument": {
"type": "string",
"description": "Corporate document, if the customer is a legal entity.",
"nullable": true,
"example": "corporateDocument"
},
"stateInscription": {
"type": "string",
"description": "State inscription, if the customer is a legal entity.",
"nullable": true,
"example": "stateInscription"
},
"corporatePhone": {
"type": "string",
"description": "Corporate phone number, if the customer is a legal entity.",
"nullable": true,
"example": "corporatePhone"
},
"isCorporate": {
"type": "boolean",
"description": "Indicates whether the customer is a legal entity.",
"example": true
},
"profileCompleteOnLoading": {
"type": "boolean",
"description": "Indicates whether profile is complete on loading.",
"example": false
},
"profileErrorOnLoading": {
"type": "boolean",
"description": "Indicates whether profile presents error on loading.",
"nullable": true,
"example": false
},
"customerClass": {
"type": "string",
"description": "Customer class.",
"nullable": true,
"example": "customerClass"
}
}
},
"geoCoordinates": {
"type": "array",
"description": "Array containing two floats with geocoordinates, first longitude, then latitude.",
"example": [
-47.924747467041016,
-15.832582473754883
],
"items": {
"type": "number",
"description": "A float representing either longitude or latitude coordinate.",
"example": -47.924747467041016
}
},
"isCheckedIn": {
"type": "boolean",
"description": "Indicates whether order is checked in.",
"default": false
},
"storeId": {
"type": "string",
"description": "ID of the store.",
"nullable": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"headers": {},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"description": "Information on each item in the cart.",
"items": {
"type": "object",
"description": "Detailed information about a specific item in the cart, including its attributes such as ID, name, price, and quantity.",
"properties": {
"id": {
"type": "string",
"description": "ID of the item."
},
"requestIndex": {
"type": "integer",
"description": "Request index information."
},
"quantity": {
"type": "integer",
"description": "The quantity of the item the cart."
},
"seller": {
"type": "string",
"description": "The seller responsible for the SKU."
},
"sellerChain": {
"type": "array",
"description": "Sellers involved in the chain. The list should contain only one seller, unless it is a [Multilevel Omnichannel Inventory](https://help.vtex.com/en/tutorial/multilevel-omnichannel-inventory--7M1xyCZWUyCB7PcjNtOyw4) order.",
"items": {
"type": "string",
"description": "Seller."
}
},
"tax": {
"type": "integer",
"description": "Tax value in cents."
},
"priceValidUntil": {
"type": "string",
"description": "Price expiration date and time."
},
"price": {
"type": "integer",
"description": "Price in cents."
},
"listPrice": {
"type": "integer",
"description": "List price in cents."
},
"rewardValue": {
"type": "integer",
"description": "Reward value in cents."
},
"sellingPrice": {
"type": "integer",
"description": "Selling price in cents. Note that this field may be subject to rounding discrepancies. We recommend retrieving data from the `priceDefinition` data structure instead."
},
"offerings": {
"type": "array",
"description": "Array containing offering information.",
"items": {
"type": "object",
"description": "Details of offering information.",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the offering."
},
"name": {
"type": "string",
"description": "Name of the offering."
},
"price": {
"type": "integer",
"description": "Price of the offering in cents."
},
"availability": {
"type": "string",
"description": "Availability status of the offering."
}
}
}
},
"priceTags": {
"type": "array",
"description": "Array of price tags, each of which, modifies the price in some way, like discounts or rates that apply to the item in the context of the order.",
"items": {
"type": "object",
"description": "Details of a price tag.",
"properties": {
"name": {
"type": "string",
"description": "Price tag name."
},
"value": {
"type": "integer",
"description": "Price tag value."
},
"rawValue": {
"type": "integer",
"description": "Price tag raw value."
},
"isPercentual": {
"type": "boolean",
"description": "Indicates whether price tag value is applied through a percentage."
},
"identifier": {
"type": "string",
"description": "Price tag identifier."
},
"owner": {
"type": "string",
"description": "Identification of the responsible for the price tag."
}
}
}
},
"measurementUnit": {
"type": "string",
"description": "Measurement unit."
},
"unitMultiplier": {
"type": "integer",
"description": "Unit multiplier."
},
"parentItemIndex": {
"type": "integer",
"description": "Parent item index.",
"nullable": true
},
"parentAssemblyBinding": {
"type": "string",
"description": "Parent assembly binding.",
"nullable": true
},
"availability": {
"type": "string",
"description": "Availability."
},
"priceDefinition": {
"type": "object",
"description": "Price information for all units of a specific item.",