v50

latestOpenAPI 3.0.0raw.githubusercontent.com2026-05-142616180.5 KB
Scroll

Scroll documents

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.

In 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.

After 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.

First request example:

/dataentities/CL/scroll?isCluster=true&_size=250&_fields=email,firstName

To inform the number of documents per request, use the query string parameter _size, which has the maximum value of 1000.

After the first request, retrieve the token in the header X-VTEX-MD-TOKEN and make the next requests.

Example of subsequent requests:

/dataentities/CL/scroll?_token={tokenValue}

ℹ️ Learn more about Pagination in the Master Data API.

Query examples

Filter TypeExample
Simple filter/dataentities/CL/scroll?email=my@email.com
Complex filter/dataentities/CL/scroll?_where=(firstName=Jon OR lastName=Smith) OR (createdIn between 2001-01-01 AND 2016-01-01)
Date range/dataentities/CL/scroll?_where=createdIn between 2001-01-01 AND 2016-01-01
Numeric field range/dataentities/CL/scroll?_where=age between 18 AND 25
Partial filter/dataentities/CL/scroll?firstName=*Maria*
Null values/dataentities/CL/scroll?_where=firstName is null
Non-null values/dataentities/CL/scroll?_where=firstName is not null
Difference/dataentities/CL/scroll?_where=firstName<>maria
Greater than/dataentities/CL/scroll?_where=number>5
Less than/dataentities/CL/scroll?_where=date<2001-01-01

⚠️ 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.

Permissions

Any user or API key must have at least one of the appropriate License Manager resources 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:

ProductCategoryResource
Dynamic StorageDynamic storage generic resourcesRead only documents
Dynamic StorageDynamic storage generic resourcesInsert or update document (not remove)
Dynamic StorageDynamic storage generic resourcesFull access to all documents
Dynamic StorageDynamic storage generic resourcesMaster Data administrator

There are no applicable predefined roles for this resource list. You must create a custom 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.

❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.

get/api/dataentities/{acronym}/scroll

Path parameters

acronymstring required
Example:SP

Two-letter string that identifies the data entity.

Query parameters

_fieldsstring
Example:email,firstName,document

Names of the fields that will be returned per document, separated by a comma ,. It is possible to fetch all fields using _all as the value of this query parameter. However, in order to avoid permission errors, we strongly recommend informing only the names of the exact fields that will be used.

_wherestring
Example:firstName is not null

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).

_sortstring
Example:firstName ASC

Defines sorting mode in two parts. The first part is the name of the field you want to sort by. It can be a nested field up to the first level (e.g. wishlistProduct.productName). In the second part, use ASC for ascending order or DESC for descending order.

_sizestring
Example:10

Maximum amount of documents returned per request. The maximum value you can set is 1000.

_tokenstring
Example:123456

Value of the X-VTEX-MD-TOKEN token obtained in the response header of the first request, necessary on subsequent requests to continue scrolling through documents. The token expires after 20 minutes of inactivity, and each request made with the token during this time resets the expiration timer.

Headers

Content-Typestring required

Type of the content being sent.

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Response

OK

additionalPropertiesstring

Custom properties.

idstring

Unique identifier of the document.

accountIdstring

Unique identifier of the account.

accountNamestring

Account name.

dataEntityIdstring

Two-letter string that identifies the data entity.