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

> ## Agent Instructions
> These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict.

# Shopify

> A stateful replica of the Shopify Admin GraphQL API: orders, products and variants, inventory, customers, fulfillments and refunds for one store.

The Shopify replica serves 32 operations of the Admin GraphQL API, version `2026-10`, for one store: 16 queries and 16 mutations over orders, products, inventory, customers, fulfillments and refunds. Its key is `shopify`. It was tested with `@shopify/admin-api-client`.

## Connect

| Variable | Value |
| - | - |
| `SHOPIFY_API_URL` | Base URL. The GraphQL endpoint is `SHOPIFY_API_URL/admin/api/2026-10/graphql.json`. |
| `SHOPIFY_ACCESS_TOKEN` | Fake Admin API access token. Send it as `X-Shopify-Access-Token`. |
| `SHOPIFY_API_VERSION` | `2026-10`. |

```js Node theme={null}
import { createAdminApiClient } from '@shopify/admin-api-client';
const shopify = createAdminApiClient({ storeDomain: 'acme-store.myshopify.com', apiVersion: process.env.SHOPIFY_API_VERSION!, accessToken: process.env.SHOPIFY_ACCESS_TOKEN!,
  customFetchApi: (url, init) => fetch(String(url).replace(/^https:\/\/[^/]+/, process.env.SHOPIFY_API_URL!), init) });
const { data, errors } = await shopify.request('{ orders(first: 10) { nodes { id name } } }');
```

This is what `ancha connect shopify --lang ts` prints. The client always calls `https://<store>.myshopify.com`, so its `customFetchApi` swaps that origin for `SHOPIFY_API_URL`.

## Operations

| Kind | Operation | Support |
| - | - | - |
| query | `shop`, `order`, `product`, `productVariants`, `productVariant`, `customers`, `customer`, `locations`, `location`, `inventoryItem`, `fulfillmentOrder`, `node`, `nodes`, `job` | supported |
| query | `orders` | partial: Shopify's search syntax over the documented filters; undocumented ones are ignored with a warning; oldest first by default, as in Shopify |
| query | `products` | partial: only `ACTIVE` products unless the query filters `status`, per Shopify's documented default |
| mutation | `tagsAdd`, `tagsRemove`, `orderMarkAsPaid`, `orderClose`, `orderOpen`, `fulfillmentTrackingInfoUpdate`, `customerCreate` | supported |
| mutation | `orderUpdate` | partial: metafields and localized fields are gaps |
| mutation | `orderCancel` | partial: restock and refund to the original payment method; store credit is a gap |
| mutation | `refundCreate` | partial: money moves only through `REFUND` transactions; duties and store credit are gaps; `@idempotent` required from 2026-04 |
| mutation | `fulfillmentCreate` | partial: one fulfillment order per order, at its assigned location |
| mutation | `productUpdate` | partial: title, handle, description, vendor, type, status and tags; SEO, metafields, media and collections are gaps |
| mutation | `productVariantsBulkUpdate` | partial: prices, barcode, taxable, inventory policy, SKU, tracking and cost; option values and media are gaps |
| mutation | `inventoryAdjustQuantities`, `inventorySetQuantities` | partial: `changeFromQuantity` and `@idempotent` required from 2026-04 |
| mutation | `customerUpdate` | partial: marketing consent, addresses and metafields are gaps |

Fields and operations outside this list answer as coverage gaps in GraphQL's error shape. Query cost is an estimate of Shopify's.

## Starter data

The `shopify-starter` dataset is **Acme Store** (`acme-store`), owned by Ben Carter, in USD and America/Los\_Angeles, with orders numbered from 1001.

| Record | Detail |
| - | - |
| Locations | "Oakland warehouse" (fulfills online orders) and "Reno overflow". |
| Products | "Acme Edge Gateway" (Ethernet 349.00 and LTE 449.00; the LTE variant has two units left), "Sensor Tag 10-pack" (89.00), "Wall Mount Kit" (29.00), "Acme Hoodie" (S, M and L; M is out of stock) and a draft "Acme Edge Gateway Pro" (649.00). Variants carry SKUs, costs and inventory per location. |
| Customers | Grace Lin (Bluefield Logistics), Carla Diaz (Kestrel Credit Union, net terms), Derek Moss (Helix Manufacturing, disabled), Lucy Grant (Harbor Foods), Nora Bell (Pinecrest Health), Megan Shaw (Summit Freight) and Erin Walsh (Ridgeway Robotics, pilot). |
| Orders | Eight: delivered orders for Bluefield Logistics and Kestrel Credit Union; a Helix order cancelled after two declined payments; a Harbor Foods order refunded for a cracked housing; a Pinecrest order partly fulfilled (sensors shipped, mounts not); a Kestrel order of two gateways waiting for a bank transfer; a Summit Freight next-day order to ship to the Denver dock; and Ridgeway Robotics' pilot order of five gateways and mounts placed three hours ago, paid and unfulfilled. |

## Checks

Shopify has no state checks. Every operation goes through one GraphQL endpoint, so a trace check names that path; run `ancha explain` or `ancha world trace` once to see how the replica records the agent's requests before you write one.

## Limits

* The endpoint is `SHOPIFY_API_URL/admin/api/2026-10/graphql.json` with the `X-Shopify-Access-Token` header. The official client always calls `https://<store>.myshopify.com`: give it a `customFetchApi` that swaps that origin for `SHOPIFY_API_URL`.
* The REST Admin API, webhooks, discounts, draft orders, returns and metafields are gaps.


## Related topics

- [ancha twins](https://docs.ancha.io/cli/twins.md)
- [Tools](https://docs.ancha.io/tools/overview.md)
- [Test file (scene.yaml)](https://docs.ancha.io/reference/test-file.md)
- [ancha connect](https://docs.ancha.io/cli/connect.md)
- [Environment variables](https://docs.ancha.io/reference/environment-variables.md)


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