-
Notifications
You must be signed in to change notification settings - Fork 133
/
VTEX - MasterData API - v10.2.json
2483 lines (2483 loc) · 161 KB
/
VTEX - MasterData API - v10.2.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": "Master Data API - v1",
"description": "Master Data is a highly customizable VTEX database solution, which enables you to create applications. By default, Master Data is used to store and organize Customer data from your store. It features a powerful search engine, allowing you to store, search, expand, and customize data. Learn more about [Master Data v1](https://help.vtex.com/en/tutorial/master-data--4otjBnR27u4WUIciQsmkAw).\r\n\r\n## Index\r\n\r\n### Data Entities\r\n\r\nObtain information about the structure of the data entities.\r\n\r\n- `GET` [List data entities](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities)\r\n- `GET` [Get data entity structure](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities/-acronym-)\r\n\r\n### Documents\r\n\r\nCreate, update and retrieve documents.\r\n\r\n- `POST` [Create new document](https://developers.vtex.com/docs/api-reference/masterdata-api#post-/api/dataentities/-acronym-/documents)\r\n- `PUT` [Create document with custom ID or Update entire document](https://developers.vtex.com/docs/api-reference/masterdata-api#put-/api/dataentities/-acronym-/documents/-id-)\r\n- `PATCH` [Create or update partial document](https://developers.vtex.com/docs/api-reference/masterdata-api#patch-/api/dataentities/-acronym-/documents)\r\n- `GET` [Get document](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities/-acronym-/documents/-id-)\r\n- `PUT` [Update entire document](https://developers.vtex.com/docs/api-reference/masterdata-api#put-/api/dataentities/-acronym-/documents/-id-)\r\n- `PATCH` [Update partial document](https://developers.vtex.com/docs/api-reference/masterdata-api#patch-/api/dataentities/-acronym-/documents/-id-)\r\n- `DELETE` [Delete document](https://developers.vtex.com/docs/api-reference/masterdata-api#delete-/api/dataentities/-acronym-/documents/-id-)\r\n\r\n### Customer profiles\r\n\r\nModify customer profiles in the CL entity.\r\n\r\n- `POST` [Create new customer profile](https://developers.vtex.com/docs/api-reference/masterdata-api#post-/api/dataentities/CL/documents)\r\n- `PATCH` [Update customer profile](https://developers.vtex.com/docs/api-reference/masterdata-api#patch-/api/dataentities/CL/documents/-id-)\r\n- `DELETE` [Delete customer profile](https://developers.vtex.com/docs/api-reference/masterdata-api#delete-/api/dataentities/CL/documents/-id-)\r\n\r\n### Addresses\r\n\r\nModify customer addresses in the AD entity.\r\n\r\n- `POST` [Create new customer address](https://developers.vtex.com/docs/api-reference/masterdata-api#post-/api/dataentities/AD/documents)\r\n- `PATCH` [Update customer address](https://developers.vtex.com/docs/api-reference/masterdata-api#patch-/api/dataentities/AD/documents/-id-)\r\n- `DELETE` [Delete customer address](https://developers.vtex.com/docs/api-reference/masterdata-api#delete-/api/dataentities/AD/documents/-id-)\r\n\r\n### Versions\r\n\r\nMaster Data documents are versioned. This means that, for each change, a new version is generated. The versions endpoints allow you to query the versions and also apply the state of a document to the most current version.\r\n\r\n- `GET` [List versions](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities/-acronym-/documents/-id-/versions)\r\n- `GET` [Get version](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities/-acronym-/documents/-id-/versions/-versionId-)\r\n- `PUT` [Put version](https://developers.vtex.com/docs/api-reference/masterdata-api#put-/api/dataentities/-acronym-/documents/-id-/versions/-versionId-)\r\n\r\n### Scroll\r\n\r\nDeveloped for external integration scenarios. If your collection is over 10.000 documents or you need to query the entire VTEX Master Data database, use these endpoints.\r\n\r\n- `GET` [Scroll documents](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities/-acronym-/scroll)\r\n\r\n### Search\r\n\r\nQuery a collection of documents.\r\n\r\n- `GET` [Search documents](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities/-acronym-/search)\r\n\r\n### Attachments\r\n\r\nUpload and download files.\r\n\r\n- `GET` [Retrieve attachment](https://developers.vtex.com/docs/api-reference/masterdata-api#get-/api/dataentities/-acronym-/documents/-id-/-field-/attachments/-file-name-)\r\n- `POST` [Save attachment](https://developers.vtex.com/docs/api-reference/masterdata-api#post-/api/dataentities/-acronym-/documents/-id-/-field-/attachments)\r\n\r\n### Clusters\r\n\r\nCheck if a particular document is in one or more clusters.\r\n\r\n- `POST` [Validate Document by Clusters](https://developers.vtex.com/docs/api-reference/masterdata-api#post-/api/dataentities/-acronym-/documents/-id-/clusters)\r\n\r\n### Score\r\n\r\nRecord and remove points in `Score2` type fields. Learn more about [Data entity field types](https://help.vtex.com/en/tutorial/creating-data-entity--tutorials_1265#understanding-the-types). \r\n\r\n- `PUT` [Put scores](https://developers.vtex.com/docs/api-reference/masterdata-api#put-/api/dataentities/-acronym-/documents/-id-/score)\r\n- `PUT` [Put score by field](https://developers.vtex.com/docs/api-reference/masterdata-api#put-/api/dataentities/-acronym-/documents/-id-/score/-field-name-)\r\n- `DELETE` [Delete score by field](https://developers.vtex.com/docs/api-reference/masterdata-api#delete-/api/dataentities/-acronym-/documents/-id-/score/-field-name-)\r\n",
"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/dataentities": {
"get": {
"tags": [
"Data Entities"
],
"summary": "List data entities",
"description": "Retrieves the list of existing data entities in the store. \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| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n| Dynamic Storage | Data entity | **List data entity** |\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": "Listdataentities",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Listdataentity"
}
},
"example": [
{
"acronym": "SP",
"name": "Sample",
"primaryKeyType": "GUID",
"allowGetAll": false
},
{
"acronym": "AD",
"name": "Endereço",
"primaryKeyType": "GUID",
"allowGetAll": false
},
{
"acronym": "CL",
"name": "Cliente",
"primaryKeyType": "GUID",
"allowGetAll": false
}
]
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"type": "string",
"description": "Error message."
}
}
},
"example": {
"Message": "Unauthorized"
}
}
}
}
}
}
},
"/api/dataentities/{acronym}": {
"get": {
"tags": [
"Data Entities"
],
"summary": "Get data entity structure",
"description": "Returns the data entity structure with its respective fields and data type. \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| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\r\n| Dynamic Storage | Data entity | **View data entity details** |\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": "Getdataentitystructure",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"name": "acronym",
"in": "path",
"description": "Data entity acronym.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "SP"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Getdataentityfields"
},
"example": {
"acronym": "SP",
"name": "Sample",
"primaryKeyType": "GUID",
"allowGetAll": false,
"fields": [
{
"name": "updatedIn",
"type": "Date and Time",
"displayName": "Atualizado em",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": true
},
{
"name": "updatedBy",
"type": "User Login",
"displayName": "Atualizado por",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": true
},
{
"name": "Auto_Increment",
"type": "Auto Increment",
"displayName": "Auto increment",
"isNullable": true,
"isSearchable": false,
"isFilter": false,
"isInternal": false
},
{
"name": "Boolean",
"type": "Boolean",
"displayName": "Boolean",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "createdIn",
"type": "Date and Time",
"displayName": "Criado em",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": true
},
{
"name": "createdBy",
"type": "User Login",
"displayName": "Criado por",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": true
},
{
"name": "Currency",
"type": "Currency",
"displayName": "Currency",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "Date",
"type": "Date",
"displayName": "Date",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "Date_Time",
"type": "Date and Time",
"displayName": "Date and Time",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "Decimal",
"type": "Decimal",
"displayName": "Decimal",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "Email",
"type": "Email",
"displayName": "Email",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": false
},
{
"name": "dataEntityId",
"type": "Varchar 10",
"displayName": "Entidade de dados",
"isNullable": false,
"isSearchable": true,
"isFilter": false,
"isInternal": true
},
{
"name": "File",
"type": "File",
"displayName": "File",
"isNullable": true,
"isSearchable": false,
"isFilter": false,
"isInternal": false
},
{
"name": "auto_filter",
"type": "Text",
"displayName": "Filtro automático",
"isNullable": true,
"isSearchable": false,
"isFilter": false,
"isInternal": true
},
{
"name": "accountId",
"type": "Varchar 50",
"displayName": "ID da loja",
"isNullable": false,
"isSearchable": false,
"isFilter": false,
"isInternal": true
},
{
"name": "id",
"type": "Varchar 100",
"displayName": "Id do documento",
"isNullable": false,
"isSearchable": true,
"isFilter": false,
"isInternal": true
},
{
"name": "Integer",
"type": "Integer",
"displayName": "Integer",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "Long",
"type": "Long",
"displayName": "Long",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "accountName",
"type": "Varchar 100",
"displayName": "Nome da loja",
"isNullable": false,
"isSearchable": true,
"isFilter": false,
"isInternal": true
},
{
"name": "Percent",
"type": "Percent",
"displayName": "Percent",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "Relationship",
"type": "Relationship",
"displayName": "Relationship",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": false
},
{
"name": "Score2",
"type": "Score2",
"displayName": "Score2",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "followers",
"type": "Text",
"displayName": "Seguidores",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": true
},
{
"name": "tags",
"type": "Text",
"displayName": "Tags",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": true
},
{
"name": "Text",
"type": "Text",
"displayName": "Text",
"isNullable": true,
"isSearchable": false,
"isFilter": false,
"isInternal": false
},
{
"name": "Time",
"type": "Time",
"displayName": "Time",
"isNullable": true,
"isSearchable": false,
"isFilter": false,
"isInternal": false
},
{
"name": "lastInteractionIn",
"type": "Date and Time",
"displayName": "Ultima interação em",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": true
},
{
"name": "lastInteractionBy",
"type": "User Login",
"displayName": "Ultima interação por",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": true
},
{
"name": "URL",
"type": "URL",
"displayName": "URL",
"isNullable": true,
"isSearchable": false,
"isFilter": true,
"isInternal": false
},
{
"name": "User_Login",
"type": "User Login",
"displayName": "User Login",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": false
},
{
"name": "Varchar10",
"type": "Varchar 10",
"displayName": "Varchar 10",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": false
},
{
"name": "Varchar100",
"type": "Varchar 100",
"displayName": "Varchar 100",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": false
},
{
"name": "Varchar50",
"type": "Varchar 50",
"displayName": "Varchar 50",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": false
},
{
"name": "Varchar750",
"type": "Varchar 750",
"displayName": "Varchar 750",
"isNullable": true,
"isSearchable": true,
"isFilter": false,
"isInternal": false
}
]
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"type": "string",
"description": "Error message."
}
}
},
"example": {
"Message": "Unauthorized"
}
}
}
}
}
}
},
"/api/dataentities/{acronym}/documents": {
"post": {
"tags": [
"Documents"
],
"summary": "Create new document",
"description": "Creates a new document with an ID automatically generated by VTEX, corresponding to a given data entity. The request body is a JSON object where the key is the name of the field.\r\n\r\n>ℹ️ You can use this request to create documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update.\r\n\r\n## Custom field types\r\n\r\nThe table below presents the types of custom fields you can use when creating or updating documents in Master Data v1 and example values.\r\n\r\n| Field Type| Example value |\r\n| - | - |\r\n| Boolean | `true` |\r\n| Currency | `2.5` |\r\n| Date | `1992-11-17` |\r\n| Date_Time | `2016-09-14T19:21:01.3163733Z` |\r\n| Decimal | `2.5` |\r\n| Email | `[email protected]` |\r\n| Integer | `1000000` |\r\n| Long | `1000000000` |\r\n| Percent | `85.42` |\r\n| Time | `23:50` |\r\n| URL | `https://www.vtex.com` |\r\n| Varchar10 | `Lorem ipsu` |\r\n| Varchar50 | `Lorem ipsum dolor sit amet, consectetur adipiscing` |\r\n| Varchar750 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Varchar100 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Relationship | `5eb31afb-7ab0-11e6-94b4-0a44686e393f` |\r\n| Text | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\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| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Createnewdocument",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Object with document fields and their respective values.",
"additionalProperties": true,
"properties": {
"{fieldName}": {
"type": "string",
"description": "Field name.",
"example": "{fieldValue}"
}
}
},
"example": {
"Boolean": true,
"Currency": 2.5,
"Date": "1992-11-17",
"Date_Time": "2016-09-14T19:21:01.3163733Z",
"Decimal": 2.5,
"Email": "[email protected]",
"Integer": 1000000,
"Long": 1000000000,
"Percent": 85.42,
"Time": "23:50",
"URL": "http://www.vtex.com",
"Varchar10": "Lorem ipsu",
"Varchar50": "Lorem ipsum dolor sit amet, consectetur adipiscing",
"Varchar750": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
"Varchar100": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
"Relationship": "5eb31afb-7ab0-11e6-94b4-0a44686e393f",
"Text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IdHrefDocumentID"
},
"example": {
"Id": "CL-be30ed0b-78ec-11ee-83ab-0eca8d1868e1",
"Href": "http://apiexamples.vtexcommercestable.com.br/api/dataentities/CL/documents/be30ed0b-78ec-11ee-83ab-0eca8d1868e1",
"DocumentId": "be30ed0b-78ec-11ee-83ab-0eca8d1868e1"
}
}
}
}
}
},
"patch": {
"tags": [
"Documents"
],
"summary": "Create partial document",
"description": "Creates a partial document, sending only some of the fields.\r\n\r\n> You can use this request to create documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update. \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| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Createorupdatepartialdocument",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true,
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the document to be created.",
"example": "4e4c55ac-e491-11e6-94f4-0ac138d2d42e"
},
"{fieldName}": {
"type": "string",
"description": "Field(s) to be filled in and its respective value(s).",
"example": "{fieldValue}"
}
}
},
"example": {
"id": "4e4c55ac-e491-11e6-94f4-0ac138d2d42e",
"addressName": "4726026151251"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IdHrefDocumentID"
},
"example": {
"Id": "CL-be30ed0b-78ec-11ee-83ab-0eca8d1868e1",
"Href": "http://apiexamples.vtexcommercestable.com.br/api/dataentities/CL/documents/be30ed0b-78ec-11ee-83ab-0eca8d1868e1",
"DocumentId": "be30ed0b-78ec-11ee-83ab-0eca8d1868e1"
}
}
}
}
}
}
},
"/api/dataentities/{acronym}/documents/{id}": {
"get": {
"tags": [
"Documents"
],
"summary": "Get document",
"description": "Retrieves a document.\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| Dynamic Storage | Dynamic storage generic resources | **Read only documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Getdocument",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/fields"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Document"
},
"example": {
"id": "2f5dde81-1613-11ea-82ee-12f868feb457",
"accountId": "a8b27fb4-6516-4cc0-82b6-a5f2b011e6e2",
"accountName": "apiexamples",
"dataEntityId": "AS"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"description": "Error response body.",
"type": "object",
"properties": {
"Message": {
"description": "Error message.",
"type": "string"
}
}
},
"example": {
"Message": "Cannot read private fields"
}
}
}
}
}
},
"put": {
"tags": [
"Documents"
],
"summary": "Create document with custom ID or update entire document",
"description": "Creates a new document with a custom ID, or updates an entire document if there is already a document with the informed ID.\r\n\r\n>ℹ️ You can use this request to create or update documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update.\r\n\r\n## Custom field types\r\n\r\nThe table below presents the types of custom fields you can use when creating or updating documents in Master Data v1 and example values.\r\n\r\n| Field Type| Example value |\r\n| - | - |\r\n| Boolean | `true` |\r\n| Currency | `2.5` |\r\n| Date | `1992-11-17` |\r\n| Date_Time | `2016-09-14T19:21:01.3163733Z` |\r\n| Decimal | `2.5` |\r\n| Email | `[email protected]` |\r\n| Integer | `1000000` |\r\n| Long | `1000000000` |\r\n| Percent | `85.42` |\r\n| Time | `23:50` |\r\n| URL | `https://www.vtex.com` |\r\n| Varchar10 | `Lorem ipsu` |\r\n| Varchar50 | `Lorem ipsum dolor sit amet, consectetur adipiscing` |\r\n| Varchar750 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Varchar100 | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\r\n| Relationship | `5eb31afb-7ab0-11e6-94b4-0a44686e393f` |\r\n| Text | `Lorem ipsum dolor sit amet, consectetur adipiscing elit...` |\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| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Updateentiredocument",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Object with document fields and their respective values.",
"additionalProperties": true,
"properties": {
"{fieldName}": {
"type": "string",
"description": "Field name and value.",
"example": "{fieldValue}"
}
}
},
"example": {
"Boolean": true,
"Currency": 2.5,
"Date": "1992-11-17",
"Date_Time": "2016-09-14T19:21:01.3163733Z",
"Decimal": 2.5,
"Email": "[email protected]",
"Integer": 1000000,
"Long": 1000000000,
"Percent": 85.42,
"Time": "23:50",
"URL": "http://www.vtex.com",
"Varchar10": "Lorem ipsu",
"Varchar50": "Lorem ipsum dolor sit amet, consectetur adipiscing",
"Varchar750": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
"Varchar100": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
"Relationship": "5eb31afb-7ab0-11e6-94b4-0a44686e393f",
"Text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
}
}
},
"required": true
},
"responses": {
"204": {
"description": "No Content"
}
}
},
"patch": {
"tags": [
"Documents"
],
"summary": "Update partial document",
"description": "Updates a subset of fields of a document, without impacting the other fields.\r\n\r\n>ℹ️ You can use this request to update documents in any given data entity. Because of this, you are not restricted to using the fields exemplified below in your requests. But you should be aware of the fields allowed or required for each document you wish to update. \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| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Updatepartialdocument",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/id"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Object with the fields to be updated and their respective values."
},
"example": {
"addressName": "4726026151253"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "No Content"
}
}
},
"delete": {
"tags": [
"Documents"
],
"summary": "Delete document",
"description": "Deletes a document. \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| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Deletedocument",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/api/dataentities/{acronym}/documents/{id}/versions": {
"get": {
"tags": [
"Versions"
],
"summary": "List versions",
"description": "Lists all versions of a document. \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| Dynamic Storage | Dynamic storage generic resources | **Read only documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Listversions",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Listversion"
}
},
"example": [
{
"id": "_EAR0cJ7XB5k5grnmm0zeKGlVvVM9WCPV_",
"date": "2016-10-18T16:53:32+00:00"
},
{
"id": "_E5SH9WXVvhPBNnbQtYAAGqrIysIeNYhy_",
"date": "2016-09-08T20:11:42+00:00"
},
{
"id": "_cwVfOG7S6XeAiDBhNpLiJM1cwRiJcvdp_",
"date": "2016-07-14T00:36:36+00:00"
}
]
}
}
}
}
}
},
"/api/dataentities/{acronym}/documents/{id}/versions/{versionId}": {
"get": {
"tags": [
"Versions"
],
"summary": "Get version",
"description": "Returns the version of a document. \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| Dynamic Storage | Dynamic storage generic resources | **Read only documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Getversion",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/id"
},
{
"name": "versionId",
"in": "path",
"description": "Unique identifier of the version to retrieve.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "_X58kLameckHYRuBMUbaimlhwqslsrrwT_"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Getversion"
},
"example": {
"id": "version-id",
"author": "user-id",
"document": {
"id": "2f5dde81-1613-11ea-82ee-12f868feb457",
"accountId": "a8b27fb4-6516-4cc0-82b6-a5f2b011e6e2",
"accountName": "apiexamples",
"dataEntityId": "AS"
}
}
}
}
}
}
},
"put": {
"tags": [
"Versions"
],
"summary": "Update version",
"description": "Updates the version of a document. \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| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Putversion",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/id"
},
{
"name": "versionId",
"in": "path",
"description": "Unique identifier of the version to update.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "_X58kLameckHYRuBMUbaimlhwqslsrrwT_"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IdHref"
},
"example": {
"Id": "CL-b818cbda-e489-11e6-94f4-0ac138d2d42e",
"Href": "http://{{accountName}}.vtexcommercestable.com.br/api/dataentities/CL/documents/b818cbda-e489-11e6-94f4-0ac138d2d42e"
}
}
}
},
"304": {
"description": "Not modified. This response happens when the `versionId` informed in the path already corresponds to the current version of the document."
}
}
}
},
"/api/dataentities/{acronym}/scroll": {
"get": {
"tags": [
"Scroll"
],
"summary": "Scroll documents",
"description": "Returns a list of documents according to query parameter filters. If you need to query the entire database, or your collection is over 10000 documents, use this endpoint.\r\n\r\nIn the first request, the `X-VTEX-MD-TOKEN` token will be obtained in the response header. This token must be passed to the next request in the `_token` query string parameter. The token expires after 20 minutes of inactivity, and each request made with the token during this time resets the expiration timer.\r\n\r\nAfter the token is obtained, it is no longer necessary to send the filter or document size per page parameters. You only need to resend the token until the document collection is empty.\r\n\r\n### First request example:\r\n```\r\n/dataentities/CL/scroll?isCluster=true&_size=250&_fields=email,firstName\r\n```\r\n\r\nTo inform the number of documents per request, use the query string parameter `_size`, which has the maximum value of 1000.\r\n\r\nAfter the first request, retrieve the token in the header `X-VTEX-MD-TOKEN` and make the next requests.\r\n\r\n### Example of subsequent requests:\r\n```\r\n/dataentities/CL/scroll?_token={tokenValue}\r\n```\r\n\r\n>ℹ️ Learn more about [Pagination in the Master Data API](https://developers.vtex.com/docs/guides/pagination-in-the-master-data-api).\r\n\r\n## Query examples\r\n\r\n\r\n| **Filter Type** | **Example** |\r\n|-|-|\r\n| **Simple filter** | `\/dataentities\/CL\/[email protected]` |\r\n| **Complex filter** | `\/dataentities\/CL\/scroll?_where=(firstName=Jon OR lastName=Smith) OR (createdIn between 2001-01-01 AND 2016-01-01)` |\r\n| **Date range** | `\/dataentities\/CL\/scroll?_where=createdIn between 2001-01-01 AND 2016-01-01` |\r\n| **Numeric field range** | `\/dataentities\/CL\/scroll?_where=age between 18 AND 25` |\r\n| **Partial filter** | `\/dataentities\/CL\/scroll?firstName=*Maria*` |\r\n| **Null values** | `\/dataentities\/CL\/scroll?_where=firstName is null` |\r\n| **Non-null values** | `\/dataentities\/CL\/scroll?_where=firstName is not null` |\r\n| **Difference** | `\/dataentities\/CL\/scroll?_where=firstName<>maria` |\r\n| **Greater than** | `\/dataentities\/CL\/scroll?_where=number>5` |\r\n| **Less than** | `\/dataentities\/CL\/scroll?_where=date<2001-01-01` |\r\n\r\n>⚠️ Avoid sending too many requests with wildcards (`*`) in the search parameters or that use the `keyword` parameter. This may lead to this endpoint being temporarily blocked for your account. If this happens, you will receive an error with status code `429`.\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| Dynamic Storage | Dynamic storage generic resources | **Read only documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** |\r\n| Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** |\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": "Scrolldocuments",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"$ref": "#/components/parameters/acronym"
},
{
"$ref": "#/components/parameters/fields"
},
{
"name": "_where",
"in": "query",
"description": "Defines a condition the document must comply with. When referring to fields, you can use a nested field up to the first level (e.g. `wishlistProduct.productName`).",
"required": false,
"style": "form",