canonical: https://jentic.com/apis/itembase.io/itembase

# itembase Frontend Manipulation API

Jentic publishes the only available OpenAPI specification for itembase Frontend Manipulation API, keeping it validated and agent-ready. The API delivers JS, CSS, and HTML snippets to the storefront of merchants connected through itembase. Each snippet is scoped by a connection identifier and is created, listed, updated, or deleted via the four `/data/v2/connections/{connection_id}/snippet` endpoints. The pattern is used for embedding partner widgets, conversion tracking pixels, or merchant-specific UI overrides without redeploying the storefront itself.

## For AI agents

Push JS, CSS, or HTML snippets into the frontend of an itembase-connected merchant storefront - create, retrieve, update, or remove the snippets via per-connection endpoints.

## Scope

Does not handle product catalogues, orders, or merchant authentication - use for delivering frontend JS, CSS, and HTML snippets only.

## Capabilities

- Push a new JavaScript or HTML snippet into a connected merchant storefront
- Update an existing snippet to roll out a fix without re-deploying the storefront
- Retrieve the current snippet content stored against a connection for audit
- Remove a snippet to retire a partner integration cleanly
- Manage many merchant connections from a single integration codebase using connection_id as the key

## Use cases

### Partner pixel deployment across connected merchants

Roll out an analytics or remarketing pixel across many itembase-connected merchant storefronts by calling POST `/data/v2/connections/{connection_id}/snippet` for each connection. The API delivers the snippet to the merchant frontend without needing the merchant to touch their own template files. Replaces the bespoke per-merchant deployment process that partners would otherwise need.

Example prompt: For each connection in the supplied list, POST `/data/v2/connections/{connection_id}/snippet` with the supplied JavaScript pixel body

### Versioned A/B testing of frontend scripts

Run A/B tests of a frontend enhancement script by writing variant snippets to subsets of connections through PUT `/data/v2/connections/{connection_id}/snippet/{snippet_id}.` The agent rotates which variant is live by updating the snippet body, and rolls back instantly with another PUT if metrics degrade. Avoids the lag of waiting for a merchant to redeploy their store.

Example prompt: Update snippet abc123 on connection xyz456 to the variant B JavaScript body and record the rollout time

### Auditable snippet inventory for compliance

Maintain an auditable inventory of every script running on connected merchants by calling GET `/data/v2/connections/{connection_id}/snippet/{snippet_id}` on a schedule. The agent stores hashes of each snippet body and flags drift between expected and actual content. Useful for partners that need to demonstrate compliance with merchant security baselines.

Example prompt: For each connection in the partner workspace, fetch all snippets and record their content hashes

### AI agent rolling out merchant-specific banners

An AI agent supporting a partner success team can deploy a custom banner snippet to a single merchant in seconds. Through Jentic the agent searches for 'create itembase frontend snippet' and the matching operation is loaded - the agent only needs the connection id and snippet body. Removes a manual step from the partner support workflow.

Example prompt: Push the supplied banner HTML to connection xyz456 as a new snippet and return the snippet id

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/data/v2/connections/{connection_id}/snippet` | Create a snippet for a merchant connection |
| GET | `/data/v2/connections/{connection_id}/snippet/{snippet_id}` | Retrieve a snippet by id |
| PUT | `/data/v2/connections/{connection_id}/snippet/{snippet_id}` | Update an existing snippet |
| DELETE | `/data/v2/connections/{connection_id}/snippet/{snippet_id}` | Remove a snippet |

## Key resources

- **Snippet** — JS, CSS, or HTML payload pushed to a connected merchant storefront, manageable per snippet identifier

## Why Jentic

- **Setup:** Wiring the itembase Frontend Manipulation API by hand means managing snippet CRUD across per-connection paths and the partner credential yourself. Through Jentic you install once, import itembase from the API Directory, store the partner credential once, and your agent calls it.
- **Permission scoping:** itembase puts the connection id in the URL path (`/data/v2/connections/{connection_id}/snippet/...`), so a rule can pin your agent to one connection: it can create and read snippets for that connection and nothing else. You choose the operations it may call, so snippet update or delete are not included unless you add them.
- **Credential handling:** Your itembase partner credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'push a frontend snippet to a merchant connection', and Jentic returns the matching itembase operation with its connection and snippet identifier parameters so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Shopify Admin API** — Shopify-native ScriptTag and Theme APIs cover similar storefront snippet injection but only for Shopify merchants
- **Magento (Adobe Commerce) API** — Magento module APIs allow comparable script injection but require a per-merchant module deployment
- **Ecwid API** — Ecommerce platform with its own storefront customisation endpoints, often surfaced alongside itembase connectors

## FAQ

### Why is there no official OpenAPI spec for itembase Frontend Manipulation API?

itembase publishes documentation through SwaggerHub but the spec is alpha-tagged and is not consistently mirrored on the vendor site. Jentic generates and maintains this spec so that AI agents and developers can call the Frontend Manipulation API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the itembase Frontend API use?

The OpenAPI document does not declare a security scheme - practical access is gated by the connection_id the partner is allowed to address, with auth handled at the partner-account boundary. Through Jentic any partner-level credential is held in the vault and injected at request time.

### Can I update a snippet without recreating it?

Yes. Call PUT `/data/v2/connections/{connection_id}/snippet/{snippet_id}` with the new payload to replace the snippet content in place. The snippet identifier remains stable for downstream tracking.

### What are the rate limits for the itembase Frontend API?

Rate limits are not declared in the spec. itembase applies fair-use throttling tied to the partner account, which is generous for typical rollout volumes. Confirm the per-account limit before scripting a fan-out across thousands of connections.

### How do I retire a snippet through Jentic?

Search Jentic with the query 'delete itembase frontend snippet', load the DELETE `/data/v2/connections/{connection_id}/snippet/{snippet_id}` operation, and execute it with the connection and snippet identifiers. The merchant storefront stops loading the snippet on the next page render.

### Is the API only for JavaScript snippets?

It supports JS, CSS, and HTML payloads - the snippet body is treated as opaque content delivered to the frontend. Use whichever asset type the integration requires, but be aware that CSS and HTML override the merchant's native theme and need careful change control.

### Can I limit what my agent is allowed to do with the itembase Frontend Manipulation API?

Yes. Because you run Jentic One yourself, your own rules decide which of the four snippet operations the agent may call and which partner credential it uses. Since itembase puts the connection id in the URL path (`/data/v2/connections/{connection_id}/snippet`), you can pin the agent to a single connection and grant only creating and reading snippets while withholding the PUT update and DELETE operations. The credential is held by your own instance and injected at request time, so the agent only ever calls the endpoints you explicitly allow.
