Dev

GraphQL Admin API

Manage your CloudCart store programmatically with the GraphQL Admin API.

The GraphQL Admin API gives you full access to your CloudCart store — products, orders, customers, discounts, marketing, settings. One endpoint, everything the admin panel can do.

Endpoint & auth

POST /api/gql HTTP/1.1
Host: {shop}.cloudcart.com
Authorization: Bearer cc_pat_xxxxxxxxxxxxx
Content-Type: application/json

Authenticate with a Personal Access Token (cc_pat_…), created in Settings → PAT Tokens. Start with Read Only, scope up when you need writes.

30-second test

curl -X POST https://mystore.cloudcart.com/api/gql \
  -H "Authorization: Bearer $CLOUDCART_PAT" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ generalSettings { siteName } }"}'

The three rules that prevent 90% of errors

  1. Output is camelCase, grouped into sub-objects. Product.pricing { from to }, Product.flags { active }, Order.amounts { total }, Order.buyer. Flat fields like product.price don't exist.
  2. Arguments and inputs are snake_case. category_id, price_min, url_handle.
  3. Lists are connections. products(first: 10) { edges { node { … } } pageInfo { total } } — see Pagination.
query {
  products(first: 10) {
    edges {
      node {
        id
        name
        pricing { from to }
        flags { active }
      }
    }
    pageInfo { total }
  }
}

What you can work with

AreaReadWriteNotes
Productsproduct(id:), products(…), productSearch(query:)createProduct, updateProduct, deleteProductRich filters: query, sku, active, category_id, price_min/max, stock
Product contentproduct tabs, files, labels, banners, reviews, questionscreateProductTab, createProductFile, createProductLabel, …
Ordersorders(…) with admin-grade filtersfulfillment, status mutationsOrder.amounts, Order.buyer, Order.statuses sub-objects
Customerscustomers(…) incl. total_spent, segment filterscreate / update mutations
Discounts & codesdiscounts, codescreate / update / delete
SegmentssegmentConditions, segment queriescreateSegmentCondition tree discovered via segmentConditions first
Bulk operationsbulkOperationStatus(jobId)productsBulkAdjustPrice, productsBulkApplyDiscount, productsBulkRoundPrices, …Async, queue-backed — the only safe way past a few dozen records
Apps & integrationsapplication(key:), applications(…)app-specific mutationsShipping, payments, ERP/POS ship as marketplace apps — check isInstalled / isActive / isConfigured first
SettingsgeneralSettings, …update mutations
CLI tokenscliTokenscreateCliToken, updateCliTokenManage PATs programmatically

This is a map, not an inventory — the schema is large. Discover precisely what you need:

# Search the live schema by topic
cloudcart app schema --search segment --compact

# Or let your AI assistant do it via the MCP server

Let your AI assistant write the queries

The Dev MCP server gives Claude Code, Cursor, Codex CLI, and Gemini CLI direct access to this schema — semantic search in any language, plus validation of every query before you run it. Pair it with the CloudCart CLI to execute.

Guides

On this page