> ## Documentation Index
> Fetch the complete documentation index at: https://vexidata.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Magento

> Connect your Magento 2 or Adobe Commerce store to VexiData to read and manage store data with your AI assistant.

Connect your Magento 2 store and your AI assistant can answer questions about orders, products, customers, inventory, and cart price rules — and, for anyone with write access to the connection, create and change them. Magento connects with the tokens of an **integration** you create in the Magento Admin. VexiData signs every request with them (OAuth 1.0a), so no admin password is stored and nothing has to be switched on in the store's configuration.

## Prerequisites

* A Magento Open Source or Adobe Commerce **2.4** store — on your own infrastructure or on Adobe's cloud infrastructure — served over **HTTPS** at a publicly reachable address. VexiData rejects plain `http://` stores. Adobe Commerce as a Cloud Service (the SaaS edition) is not supported
* A Magento Admin account allowed to create integrations under **System** > **Extensions** > **Integrations**
* The **Connect sources** capability in your VexiData organization, to connect the platform — Owners and Admins have it by default

> [!NOTE]
>
> VexiData connects to your store from the public internet, so it refuses
> addresses that only exist on your own machine or network: `localhost`,
> hostnames ending in `.local` or `.internal`, private IP addresses, and
> hostnames that don't resolve or that resolve to a private address. A local
> development store can't be connected. Use a staging or live store with a
> public HTTPS address instead.

## Connect Magento

**1. Create an integration in Magento**

1. In the Magento Admin, go to **System** > **Extensions** > **Integrations** and click **Add New Integration**
2. Enter a **Name** (for example, `VexiData`) and your email, leave the callback and identity link URLs empty, and confirm with **Your Password**
3. Open the **API** tab and set **Resource Access** to **All** — or pick **Custom** and tick at least the resources in the [table below](#api-resources)
4. Click **Save**, then click **Activate** next to the new integration and **Allow**
5. Copy the **Consumer Key**, **Consumer Secret**, **Access Token**, and **Access Token Secret** from the **Integration Tokens for Extensions** dialog, then click **Done**

**2. Add the connection in VexiData**

Go to the [**Integrations**](https://vexidata.com/integrations) page in VexiData, click **Connect** on **Magento**, and fill in:

| Field | Value |
| - | - |
| **Store URL** | Your store's address, for example `https://shop.example.com`. If the store runs without URL rewrites, include `/index.php` |
| **Consumer key** | The integration's consumer key |
| **Consumer secret** | The integration's consumer secret |
| **Access token** | The integration's access token |
| **Access token secret** | The integration's access token secret |

**3. Test and connect**

Click **Test connection** to check the tokens without saving, then click **Connect**. VexiData reads your store's configuration (`/rest/V1/store/storeConfigs`) to verify the tokens, and names the connection after your store's domain. If the test fails, work through the [troubleshooting](#troubleshooting) section below.

## API resources

With **Resource Access** set to **All**, every tool works. With **Custom**, tick the resources for what you want the AI to reach. **Stores** > **Settings** > **All Stores** is always needed, because the connection test reads the store configuration.

| To let the AI… | Tick in the integration's API tree |
| - | - |
| Connect at all (store views, currencies, timezone) | **Stores** > **Settings** > **All Stores** |
| Read orders, invoices, shipments, credit memos, and transactions | **Sales** > **Operations** > **Orders** > **Actions** > **View**, plus **Invoices**, **Shipments**, **Credit Memos**, and **Transactions** > **Fetch** |
| Comment on, cancel, hold, invoice, ship, or refund orders | The matching entries under **Sales** > **Operations** > **Orders** > **Actions** |
| Read and manage products, categories, attributes, and stock | **Catalog** (with **Inventory** > **Products** and **Categories**), **Stores** > **Attributes**, and **Stores** > **Inventory** for multi-source stock |
| Read and manage customers | **Customers** > **All Customers** and **Customer Groups** |
| Read and manage cart price rules and coupons | **Marketing** > **Promotions** > **Cart Price Rules** |
| Read and manage CMS pages and blocks | **Content** > **Elements** > **Pages** and **Blocks** |

When a tool needs a resource the integration lacks, the error names it. Grant it in the integration's **API** tab and save; if Magento asks you to reauthorize, connect the store again in VexiData with the new tokens.

## Managing the connection

To connect more stores, click **Add account** on the Magento card on the [**Integrations**](https://vexidata.com/integrations) page — each store keeps its own URL and tokens.

The connection with the **Primary** badge is the primary, which tools use when a request doesn't name one. To change it, open another connection and click **Make primary** in its **Connection** card.

To rotate tokens, click **Reauthorize** on the integration in Magento, copy the new tokens, and connect the same store URL again — VexiData updates the existing connection. To remove a store, open its connection and click **Disconnect** in the **Connection** card.

Stores with several store views or websites need nothing extra: ask for a store view by its code and the AI addresses it directly; without one, Magento answers for the default store view. Global catalog changes use Magento's `all` scope.

## What the AI can do

| Tool | What it does | Access |
| - | - | - |
| `magento_read` | Reads store data — orders, products, customers, categories, inventory, promotions, CMS content, and store configuration. | Read |
| `magento_write` | Creates or updates store resources, such as adding a product, changing stock, or commenting on, invoicing, or shipping an order. | Write |
| `magento_delete` | Deletes a store resource, such as a product, category, customer, coupon, or cart price rule. | Destructive |

> [!WARNING]
>
> `magento_write` and `magento_delete` act on your live store, and Magento
> has no trash: deletions are permanent. Review what the AI proposes before
> approving a change. Both need **Write** access on the connection — by
> default, Owners and Admins. Members can use `magento_read` only.

## Troubleshooting

> [accordion] Connection test fails
>
> * Confirm the store URL is correct and starts with `https://`. Pasting the API base (`…/rest/V1`) works too — VexiData trims it
> * If the error says the store URL points to a blocked host or a private network address (or resolves to one), VexiData can't reach the store from the public internet — see the note under [Prerequisites](#prerequisites)
> * If the error says no Magento REST API answered at `/rest/V1`, the store may run without URL rewrites — add `/index.php` to the store URL, for example `https://shop.example.com/index.php`
> * Check your SSL certificate is valid and not expired, and that no firewall or WAF rule blocks requests to `/rest/`

> [accordion] The integration is not allowed to use an API resource
>
> Magento answers with HTTP 401 for a missing permission as well as for bad tokens. When the message names a resource such as `Magento_Sales::actions_view`, the tokens are fine: in the Magento Admin open **System** > **Extensions** > **Integrations**, edit the integration, tick that resource under **API** (or set **Resource Access** to **All**), and save. If Magento asks you to reauthorize, connect the store again in VexiData with the new tokens.

> [accordion] Magento rejected the request credentials
>
> * Make sure all four values come from the same integration and were copied in full — Magento shows them in the **Integration Tokens for Extensions** dialog when you activate or reauthorize it
> * Check the integration is **Active** under **System** > **Extensions** > **Integrations**; reauthorizing or deleting it invalidates the old tokens
> * VexiData signs requests with OAuth 1.0a, so the **Allow OAuth Access Tokens to be used as standalone Bearer tokens** setting can stay off

> [accordion] Large stores and page sizes
>
> List endpoints return at most the page size the AI asks for (50 by default). If your store has **Web API Input Limits** enabled under **Stores** > **Configuration** > **Services** > **Magento Web API**, requests above its **Maximum Page Size** (300 by default) fail, and the AI pages through results in smaller steps instead.

> [accordion] Tools don't appear in my AI client
>
> Tools register as soon as the platform is connected, but some clients cache the tool list. Reload or reconnect the VexiData connector in your AI client.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.