-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathVTEX - Ad Network API.json
1924 lines (1924 loc) · 126 KB
/
VTEX - Ad Network 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": {
"version": "0.1.12",
"title": "VTEX Ad Network API",
"description": "VTEX Ad Network connects VTEX stores with brands interested in advertising their products. This connection allows advertisers and publishers to boost their business:\r\n\r\n* **Advertisers:** Brands that can create ad campaigns to promote products in VTEX stores offering the same products in their catalogs, thus increasing sales. \r\n\r\n* **Publishers:** Can offer ad space in their stores for advertisers to promote products. In return, these publishers will receive a fee for each click on an ad in their stores.\r\n\r\n> Learn more about [VTEX Ad Network](https://help.vtex.com/en/tutorial/vtex-ad-network-beta--2cgqXcBuJmXN2livQvClur).\r\n\r\n## Index\r\n### Sponsored products\r\n `GET` [Get sponsored products for a query](https://developers.vtex.com/docs/api-reference/vtex-ad-network-api#get-/sponsored_products/-facets-)\r\n### Ad events\r\n `POST` [Send ad events](https://developers.vtex.com/docs/api-reference/vtex-ad-network-api#post-/ads)\r\n### Order events\r\n `POST` [Send order events](https://developers.vtex.com/docs/api-reference/vtex-ad-network-api#post-/order)\r\n### Banner\r\n `POST` [Get banner information](https://developers.vtex.com/docs/api-reference/vtex-ad-network-api#post-/banner/query)\r\n## Common parameters \r\n\r\n| **Parameter name** | **Description** |\r\n| --------------- | ----------------- | \r\n| `{{accountName}}` | Name of the VTEX account. Used as part of the URL. | \r\n| ` {{environment}}` | Environment to use. Used as part of the URL. |",
"license": {
"name": "MIT"
}
},
"servers": [
{
"url": "https://{accountName}.{environment}.com.br/api/io/_v/api/ad-server",
"description": "VTEX Ad Network server URL.",
"variables": {
"accountName": {
"default": "apiexamples",
"description": "Name of the VTEX account. Used as part of the URL."
},
"environment": {
"description": "Environment to use. Used as part of the URL.",
"enum": [
"vtexcommercestable"
],
"default": "vtexcommercestable"
}
}
}
],
"paths": {
"/sponsored_products/{facets}": {
"get": {
"summary": "Get sponsored products for a query",
"description": "Lists sponsored products for a given search query. This endpoint must be used when the merchant uses a third-party search engine.\r\n\r\n## Permissions\r\n\r\nThis endpoint does not require [authentication](https:\/\/developers.vtex.com\/docs\/guides\/authentication) or [permissions](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3).",
"tags": [
"Sponsored products"
],
"parameters": [
{
"$ref": "#/components/parameters/facetsPath"
},
{
"$ref": "#/components/parameters/query"
},
{
"$ref": "#/components/parameters/products"
},
{
"$ref": "#/components/parameters/sponsoredCount"
},
{
"$ref": "#/components/parameters/advertisementPlacement"
},
{
"$ref": "#/components/parameters/simulationBehavior"
},
{
"$ref": "#/components/parameters/locale"
},
{
"$ref": "#/components/parameters/hideUnavailableItems"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SponsoredProducts"
},
"example": [
{
"advertisement": {
"adId": "88346159-1ec4-4c4b-a33c-fdd1a1080fdb",
"campaignId": "7ecd769b-0572-444f-9719-0072887d1046",
"actionCost": 0.25,
"adRequestId": "522eccfe-83d6-4b26-aa4d-773d00986532",
"adResponseId": "f4711939-ba78-4d46-899c-d38538a8c299"
},
"cacheId": "sp-2000003",
"productId": "2000003",
"description": "Introducing our exquisite Top Wood Clock, a timeless blend of elegance and craftsmanship. Crafted from premium-quality wood, this clock seamlessly combines functionality with aesthetic appeal. Its sleek design and rich wood finish make it a sophisticated addition to any space, from classic to contemporary interiors.",
"productName": "Top Wood Clock",
"productReference": "clock120",
"linkText": "wood-clock",
"brand": "Sony",
"brandId": 2000005,
"link": "/wood-clock/p",
"categories": [
"/Home & Decor/"
],
"categoryId": "40",
"categoriesIds": [
"/40/"
],
"priceRange": {
"sellingPrice": {
"highPrice": 197.99,
"lowPrice": 197.99
},
"listPrice": {
"highPrice": 197.99,
"lowPrice": 197.99
}
},
"specificationGroups": [
{
"originalName": "allSpecifications",
"name": "allSpecifications",
"specifications": [
{
"originalName": "sellerId",
"name": "sellerId",
"values": [
"1"
]
}
]
}
],
"skuSpecifications": [],
"productClusters": [
{
"id": "1970",
"name": "Summer"
}
],
"clusterHighlights": [
{
"id": "1970",
"name": "Summer"
}
],
"properties": [
{
"name": "sellerId",
"originalName": "sellerId",
"values": [
"1"
]
}
],
"items": [
{
"sellers": [
{
"sellerId": "1",
"sellerName": "VTEX",
"addToCartLink": "",
"sellerDefault": true,
"commertialOffer": {
"DeliverySlaSamplesPerRegion": {},
"DeliverySlaSamples": [],
"AvailableQuantity": 10000,
"discountHighlights": [],
"Installments": [
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "American Express à vista",
"PaymentSystemName": "American Express"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Visa à vista",
"PaymentSystemName": "Visa"
},
{
"Value": 98.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 2,
"Name": "Visa 2 vezes sem juros",
"PaymentSystemName": "Visa"
},
{
"Value": 65.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 3,
"Name": "Visa 3 vezes sem juros",
"PaymentSystemName": "Visa"
},
{
"Value": 49.49,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 4,
"Name": "Visa 4 vezes sem juros",
"PaymentSystemName": "Visa"
},
{
"Value": 39.59,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 5,
"Name": "Visa 5 vezes sem juros",
"PaymentSystemName": "Visa"
},
{
"Value": 32.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 6,
"Name": "Visa 6 vezes sem juros",
"PaymentSystemName": "Visa"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Diners à vista",
"PaymentSystemName": "Diners"
},
{
"Value": 100.48,
"InterestRate": 100,
"TotalValuePlusInterestRate": 200.96,
"NumberOfInstallments": 2,
"Name": "Diners 2 vezes com juros",
"PaymentSystemName": "Diners"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Mastercard à vista",
"PaymentSystemName": "Mastercard"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Boleto Bancário à vista",
"PaymentSystemName": "Boleto Bancário"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Vale à vista",
"PaymentSystemName": "Vale"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Promissory à vista",
"PaymentSystemName": "Promissory"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Customer Credit à vista",
"PaymentSystemName": "Customer Credit"
},
{
"Value": 98.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 2,
"Name": "Customer Credit 2 vezes sem juros",
"PaymentSystemName": "Customer Credit"
},
{
"Value": 67.97,
"InterestRate": 100,
"TotalValuePlusInterestRate": 203.91,
"NumberOfInstallments": 3,
"Name": "Customer Credit 3 vezes com juros",
"PaymentSystemName": "Customer Credit"
},
{
"Value": 197.99,
"InterestRate": 0,
"TotalValuePlusInterestRate": 197.99,
"NumberOfInstallments": 1,
"Name": "Free à vista",
"PaymentSystemName": "Free"
}
],
"Price": 197.99,
"ListPrice": 197.99,
"spotPrice": 197.99,
"taxPercentage": 0,
"PriceWithoutDiscount": 197.99,
"Tax": 0,
"GiftSkuIds": [],
"BuyTogether": [],
"ItemMetadataAttachment": [],
"RewardValue": 0,
"PriceValidUntil": "2023-04-01T13:13:20Z",
"GetInfoErrorMessage": null,
"CacheVersionUsedToCallCheckout": "",
"teasers": [
{
"name": "8% Boleto",
"conditions": {
"minimumQuantity": 0,
"parameters": [
{
"name": "PaymentMethodId",
"value": "6"
}
]
},
"effects": {
"parameters": [
{
"name": "PercentualDiscount",
"value": "8.0"
}
]
}
}
]
}
}
],
"images": [
{
"imageId": "155484",
"cacheId": "155484",
"imageTag": "",
"imageLabel": "",
"imageText": "",
"imageUrl": "https://storecomponents.vtexassets.com/arquivos/ids/155484/Frame.jpg?v=636793817478300000"
},
{
"imageId": "155485",
"cacheId": "155485",
"imageTag": "",
"imageLabel": "",
"imageText": "",
"imageUrl": "https://storecomponents.vtexassets.com/arquivos/ids/155485/Frame-1.jpg?v=636793817642000000"
},
{
"imageId": "155486",
"cacheId": "155486",
"imageTag": "",
"imageLabel": "",
"imageText": "",
"imageUrl": "https://storecomponents.vtexassets.com/arquivos/ids/155486/Frame-2.jpg?v=636793817785530000"
}
],
"itemId": "2000534",
"name": "1",
"nameComplete": "Top Wood Clock 1",
"complementName": "",
"referenceId": [
{
"Key": "RefId",
"Value": "16001"
}
],
"measurementUnit": "un",
"unitMultiplier": 1,
"variations": [],
"ean": "16001",
"modalType": "",
"videos": [],
"attachments": [],
"isKit": false
}
],
"origin": "intelligent-search"
},
{
"advertisement": {
"adId": "15f57fc4-06fb-4d31-8508-39db1826b366",
"campaignId": "46ee9c36-52f5-4c80-9d1a-eb826cc15b47",
"actionCost": 0.25,
"adRequestId": "00003e4a-3623-4e55-aa8a-c9a73176fb9d",
"adResponseId": "7e70c643-7f9a-4e5a-af2b-1d3cec658bef"
},
"cacheId": "sp-2000214",
"productId": "2000214",
"description": "Introducing our stunning Metal Clock, a perfect blend of sophistication and durability. Crafted from high-quality metal, this clock seamlessly combines functionality with aesthetic appeal. Its sleek design and polished metal finish make it a stylish addition to any space, from modern to industrial interiors.",
"productName": "Metal Clock",
"linkText": "metal-clock-lkn",
"brand": "Sony",
"brandId": 2000005,
"link": "/metal-clock-lkn/p",
"categories": [
"/Home & Decor/"
],
"categoryId": "40",
"categoriesIds": [
"/40/"
],
"priceRange": {
"sellingPrice": {
"highPrice": 10,
"lowPrice": 10
},
"listPrice": {
"highPrice": 10,
"lowPrice": 10
}
},
"specificationGroups": [
{
"originalName": "allSpecifications",
"name": "allSpecifications",
"specifications": [
{
"originalName": "sellerId",
"name": "sellerId",
"values": [
"1"
]
}
]
}
],
"skuSpecifications": [],
"productClusters": [],
"clusterHighlights": [],
"properties": [
{
"name": "sellerId",
"originalName": "sellerId",
"values": [
"1"
]
}
],
"items": [
{
"sellers": [
{
"sellerId": "1",
"sellerName": "VTEX",
"addToCartLink": "",
"sellerDefault": true,
"commertialOffer": {
"DeliverySlaSamplesPerRegion": {},
"DeliverySlaSamples": [],
"AvailableQuantity": 10000,
"discountHighlights": [],
"Installments": [
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "American Express à vista",
"PaymentSystemName": "American Express"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Visa à vista",
"PaymentSystemName": "Visa"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Diners à vista",
"PaymentSystemName": "Diners"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Mastercard à vista",
"PaymentSystemName": "Mastercard"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Boleto Bancário à vista",
"PaymentSystemName": "Boleto Bancário"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Vale à vista",
"PaymentSystemName": "Vale"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Promissory à vista",
"PaymentSystemName": "Promissory"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Customer Credit à vista",
"PaymentSystemName": "Customer Credit"
},
{
"Value": 5,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 2,
"Name": "Customer Credit 2 vezes sem juros",
"PaymentSystemName": "Customer Credit"
},
{
"Value": 3.43,
"InterestRate": 100,
"TotalValuePlusInterestRate": 10.29,
"NumberOfInstallments": 3,
"Name": "Customer Credit 3 vezes com juros",
"PaymentSystemName": "Customer Credit"
},
{
"Value": 10,
"InterestRate": 0,
"TotalValuePlusInterestRate": 10,
"NumberOfInstallments": 1,
"Name": "Free à vista",
"PaymentSystemName": "Free"
}
],
"Price": 10,
"ListPrice": 10,
"spotPrice": 10,
"taxPercentage": 0,
"PriceWithoutDiscount": 10,
"Tax": 0,
"GiftSkuIds": [],
"BuyTogether": [],
"ItemMetadataAttachment": [],
"RewardValue": 0,
"PriceValidUntil": "2023-04-01T13:13:20Z",
"GetInfoErrorMessage": null,
"CacheVersionUsedToCallCheckout": "",
"teasers": [
{
"name": "8% Boleto",
"conditions": {
"minimumQuantity": 0,
"parameters": [
{
"name": "PaymentMethodId",
"value": "6"
}
]
},
"effects": {
"parameters": [
{
"name": "PercentualDiscount",
"value": "8.0"
}
]
}
}
]
}
}
],
"images": [
{
"imageId": "155675",
"cacheId": "155675",
"imageTag": "",
"imageLabel": "vtex",
"imageText": "vtex",
"imageUrl": "https://storecomponents.vtexassets.com/arquivos/ids/155675/vtex.jpg?v=637655270451200000"
}
],
"itemId": "310124211",
"name": "Metal Clock 1",
"nameComplete": "Metal Clock 1",
"complementName": "",
"referenceId": [
{
"Key": "RefId",
"Value": "2983678w63478"
}
],
"measurementUnit": "un",
"unitMultiplier": 1,
"variations": [],
"ean": "2398428937489",
"modalType": "",
"videos": [],
"attachments": [],
"isKit": false
}
],
"origin": "intelligent-search"
}
]
}
}
}
}
}
},
"/ads": {
"servers": [
{
"url": "https://af-origin.vtex.com/api/activity-flow",
"description": "VTEX Ad Network server."
}
],
"post": {
"summary": "Send ad events",
"description": "Sends ad events, including impressions, views, and clicks, according to these rules:\r\n\r\n* **Impressions:** Must be sent when the ad is rendered in the interface.\r\n\r\n* **Views:** Must be sent when the ad appears more than 50% on the screen for more than 1s.\r\n\r\n* **Click:** Must be sent when the ad is clicked.\r\n\r\n>⚠️ The `MacId` and the `SessionID` are required and must be handled as described in the table below. They are used as anonymous identifiers to link events with orders. These attributes are the merchant's responsibility, and they must be managed at the device level.\r\n\r\n## Permissions\r\n\r\nThis endpoint does not require [authentication](https:\/\/developers.vtex.com\/docs\/guides\/authentication) or [permissions](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3).",
"tags": [
"Ad events"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Ad event request body.",
"required": [
"accountName",
"MacId",
"Url",
"Ref",
"SessionId",
"adRequestId",
"adResponseId",
"actionType",
"productId",
"productName",
"campaignId",
"adId",
"channel"
],
"properties": {
"accountName": {
"type": "string",
"description": "Merchant's account name. It should be the same as the account name registered at VTEX.",
"example": "apiexamples"
},
"MacId": {
"type": "string",
"description": "A long-life identifier stored in the browser cookies or device of each shopper. It is valid for one year and is renewed as new events are sent. It expires if the user clears their cookies or deletes the app. Use UUID Version 4.",
"example": "f805a89b-ef06-4d6a-ae9d-4dd5699ccd6f"
},
"Url": {
"type": "string",
"description": "Current page URL or the current mobile view.",
"example": "https://www.apiexamples.com.br/busca?tshirt"
},
"Ref": {
"type": "string",
"description": "Previous page URL (accessed before the current page URL) or mobile equivalent.",
"example": "https://www.apiexamples.com.br"
},
"SessionId": {
"type": "string",
"description": "Session identifier, which expires after 30 minutes. Use UUID Version 4.",
"example": "fb252d90-7494-4097-90fd-cc73eeaa575c"
},
"placement": {
"type": "string",
"description": "Refers to where the ad is shown on the site.",
"enum": [
"top_search",
"middle_search",
"home_shelf",
"pdp_shelf",
"search_shelf",
"cart_shelf",
"plp_shelf"
],
"example": "top_search"
},
"position": {
"type": "number",
"description": "Position of the ads in the list.",
"example": 2
},
"adRequestId": {
"type": "string",
"description": "Identifier of an ad request. This ID should be retrieved through the [ad request](https://developers.vtex.com/docs/api-reference/vtex-ad-network-api#get-/sponsored_products/-facets-).",
"example": "1f97dca0-b022-4bce-907c-d22daa1cef01"
},
"adResponseId": {
"type": "string",
"description": "Identifier of an ad response. This ID should be retrieved through the [ad request](https://developers.vtex.com/docs/api-reference/vtex-ad-network-api#get-/sponsored_products/-facets-).",
"example": "b0b5d188-21b3-4d3a-b3ca-81c0626ff7d6"
},
"actionType": {
"type": "string",
"description": "Type of action associated with the event.",
"enum": [
"click",
"view",
"impression"
],
"example": "click"
},
"productId": {
"type": "string",
"description": "Product ID associated with the ad event.",
"example": "1234"
},
"productName": {
"type": "string",
"description": "Product name associated with the ad event.",
"example": "tshirt XYZ"
},
"campaignId": {
"type": "string",
"description": "Campaign ID to which the ad belongs.",
"example": "9e424dcd-9b46-456e-a3a5-05803c83452f"
},
"adId": {
"type": "string",
"description": "Ad identifier associated with the ad event. This ID should be retrieved through the [ad request](https://developers.vtex.com/docs/api-reference/vtex-ad-network-api#get-/sponsored_products/-facets-).",
"example": "05949176-3a10-435e-9d08-3ba8da51de3b"
},
"channel": {
"type": "string",
"description": "Specifies if it is a mobile or web client.",
"enum": [
"website",
"android",
"ios",
"msite",
"whatsapp"
],
"example": "website"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/order": {
"servers": [
{
"url": "https://af-origin.vtex.com/api/activity-flow",
"description": "VTEX Ad Network server."
}
],
"post": {
"summary": "Send order events",
"description": "Sends order events.\r\n\r\n## Permissions\r\n\r\nThis endpoint does not require [authentication](https:\/\/developers.vtex.com\/docs\/guides\/authentication) or [permissions](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3).",
"tags": [
"Order events"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Order event request body.",
"required": [
"accountName",
"macId",
"url",
"ref",
"sessionId",
"orderGroup",
"channel"
],
"properties": {
"accountName": {
"type": "string",
"description": "Merchant's account name. It should be the same as the account name registered at VTEX.",
"example": "apiexamples"
},
"macId": {
"type": "string",
"description": "A long-life identifier stored in the browser cookies or device of each shopper. It is valid for one year and is renewed as new events are sent. It expires if the user clears their cookies or deletes the app. Use UUID Version 4.",
"example": "f805a89b-ef06-4d6a-ae9d-4dd5699ccd6f"
},
"url": {
"type": "string",
"description": "Current page URL or the current mobile view.",
"example": "https://www.apiexamples.com.br/busca?tshirt"
},
"ref": {
"type": "string",
"description": "Previous page URL (accessed before the current page URL) or mobile equivalent.",
"example": "https://www.apiexamples.com.br"
},
"sessionId": {
"type": "string",
"description": "Session identifier, which expires after 30 minutes. Use UUID Version 4.",
"example": "fb252d90-7494-4097-90fd-cc73eeaa575c"
},
"orderGroup": {
"type": "string",
"description": "Order group ID for the created order. The order group ID is a segment of the order ID that groups all orders related to the same purchase. For example, in order ID `v71021570str-02`, the order group ID is `v71021570str`. The `orderGroup` value should be the same as the one created in the OMS to enable the correlation between the order events and the order tables.",
"example": "v71021570str"
},
"channel": {
"type": "string",
"description": "Specifies if it is a mobile or web client.",
"enum": [
"website",
"android",
"ios",
"msite",
"whatsapp"
],
"example": "website"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/banner/query": {
"servers": [
{
"url": "https://ad-server.vtex.com/api/ad-server/ads/",
"description": "VTEX Network server."
}
],
"post": {
"summary": "Get banner information",
"description": "Retrieves banner information. Applicable to non-VTEX stores integrating with VTEX Ad Network with targeting.\r\n\r\n## Permissions\r\n\r\nThis endpoint does not require [authentication](https:\/\/developers.vtex.com\/docs\/guides\/authentication) or [permissions](https:\/\/help.vtex.com\/en\/tutorial\/license-manager-resources--3q6ztrC8YynQf6rdc6euk3).",
"tags": [
"Banner"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Banner request body.",
"required": [
"accountName",
"adUnit",
"channel",
"count",
"placement",
"userId"
],
"properties": {
"accountName": {
"type": "string",
"description": "Merchant's account name. It should be the same as the account name registered at VTEX.",
"example": "apiexamples"
},
"adUnit": {
"type": "string",
"description": "Ad unit, which refers to the ad type.",
"example": "billboard"
},
"channel": {
"type": "string",
"description": "Specifies if it is a mobile or web client.",
"enum": [
"website",
"android",
"ios",
"msite",
"whatsapp"
],
"example": "website"
},
"count": {
"type": "number",
"description": "Product count.",
"example": 2
},
"placement": {
"type": "string",
"description": "Refers to where the ad is shown on the site.",
"enum": [
"top_search",
"middle_search",
"home_shelf",
"pdp_shelf",
"search_shelf",
"cart_shelf",
"plp_shelf"
],
"example": "top_search"
},
"userId": {
"type": "string",
"description": "User ID.",
"example": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Banner response body.",
"properties": {
"adRequestId": {
"type": "string",
"description": "Ad request ID."
},
"adResponseId": {
"type": "string",
"description": "Ad response ID."
},
"banners": {
"type": "array",
"description": "Banners information.",
"items": {
"type": "object",
"description": "Banner information.",
"properties": {
"adUnit": {
"type": "string",
"description": "Ad unit."
},
"advertiserName": {
"type": "string",
"description": "Advertiser name."
},
"bannerId": {
"type": "string",
"description": "Banner ID."
},
"bannerImageId": {
"type": "string",
"description": "Banner image ID."
},
"campaignId": {
"type": "string",
"description": "Campaign ID."
},
"height": {
"type": "number",
"description": "Banner height."
},
"width": {
"type": "number",
"description": "Banner width."
},
"imageUrl": {
"type": "string",
"description": "Banner image URL."
},
"targetUrl": {
"type": "string",
"description": "Banner target URL."
}
}
}
}
}
},
"example": {
"adRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"adResponseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"banners": [
{
"adUnit": "billboard",
"advertiserName": "string",
"bannerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"bannerImageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"campaignId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",