canonical: https://jentic.com/apis/vtex.local/master-data-api---v2

# Vtex Master Data API - v2

>ℹ️ Master Data v2 is not compatible with data entities from previous versions, such as CL and AD. [Master Data](https://developers.vtex.com/docs/guides/master-data-introduction) is a secure, fast, scalable, and extensible solution that allows users to create their own entities, store data, and retrieve information directly from the storefront or external integrations. Several internal VTEX module. The API exposes 20 endpoints secured with apiKey authentication.

## For AI agents

Programmatically create new document, create partial document. Covers 20 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Create new document
- Get document
- Update partial document
- Delete document
- Search documents

## Use cases

### Developer Tools Operations

Use the Master Data API - v2 to perform developer tools operations programmatically. The API provides 20 endpoints covering core functionality including create new document, create partial document, get document.

Example prompt: Call POST `/api/dataentities/{dataEntityName}/documents` to create new document

### Automated Documents Management

Automate documents operations by combining multiple Master Data API - v2 endpoints. Agents can create partial document and then get document in a single workflow.

Example prompt: Call PATCH `/api/dataentities/{dataEntityName}/documents` to create partial document, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Master Data API - v2 endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'create new document', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/dataentities/{dataEntityName}/documents` | Create new document |
| PATCH | `/api/dataentities/{dataEntityName}/documents` | Create partial document |
| GET | `/api/dataentities/{dataEntityName}/documents/{id}` | Get document |
| PUT | `/api/dataentities/{dataEntityName}/documents/{id}` | Create document with custom ID or update entire document |
| PATCH | `/api/dataentities/{dataEntityName}/documents/{id}` | Update partial document |
| DELETE | `/api/dataentities/{dataEntityName}/documents/{id}` | Delete document |
| GET | `/api/dataentities/{dataEntityName}/search` | Search documents |
| GET | `/api/dataentities/{dataEntityName}/scroll` | Scroll documents |

## Key resources

- **Documents** — Operations related to Documents
- **Search** — Operations related to Search
- **Scroll** — Operations related to Scroll
- **Schemas** — Operations related to Schemas
- **Indices** — Operations related to Indices

## Why Jentic

- **Setup:** Wiring the VTEX Master Data API v2 by hand means pairing an App Key with an App Token in the X-VTEX-API-AppKey and X-VTEX-API-AppToken headers, and templating the {accountName} and {environment} host into every call. Through Jentic you install once, import the Master Data API v2 from the API Directory, store the App Key and App Token once, and your agent calls it.
- **Permission scoping:** The Master Data API v2 puts the data entity name and document id in the URL path (`/api/dataentities/{dataEntityName}/documents/{id}`), so a rule can pin your agent to one data entity and its documents. You choose the operations it may call, so destructive ones like deleting a document are not included unless you add them.
- **Credential handling:** Your VTEX App Key and App Token are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a document in a data entity' or 'search records in a data entity', and Jentic returns the matching Master Data API v2 operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the Master Data API - v2 use?

The Master Data API - v2 uses an API key passed in the `X-VTEX-API-AppKey` header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I create new document with the Master Data API - v2?

Yes. Use the POST `/api/dataentities/{dataEntityName}/documents` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Master Data API - v2?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I create new document through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'create new document'. Jentic returns the matching Master Data API - v2 operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Master Data API - v2 have?

The Master Data API - v2 exposes 20 endpoints covering documents, search, scroll operations.

### Can I limit what my agent is allowed to do with the VTEX Master Data API?

Yes. Because Jentic One is self-hosted, your own rules decide which VTEX Master Data operations and credentials the agent may use. Since the data entity name and document id sit in the URL path (`/api/dataentities/{dataEntityName}/documents/{id}`), you can pin the agent to a single data entity and its documents. You also choose the exact operations it can call, so you can allow reads like search and scroll while leaving out destructive ones such as delete document unless you add them.
