Shopify store management through OpenClaw Commerce API
Full read/write access to Shopify Admin GraphQL API for managing orders, products, customers, collections, catalogs, and discounts through OpenClaw Commerce.
| Variable | Description |
|---|---|
OPENCLAW_COMMERCE_API_KEY | API key from OpenClaw Commerce Dashboard |
All requests require this header:
X-OpenClaw-Commerce-Token: $OPENCLAW_COMMERCE_API_KEY
When OPENCLAW_COMMERCE_API_KEY is not set or is invalid, the agent MUST:
Stop and ask the user for the API key, displaying these instructions:
I need your OpenClaw Commerce API key to connect to your Shopify store.
If you don't have one yet, here's how to get it:
occ_)Please paste your API key here:
When the user provides the key:
occ_ and be non-emptyOPENCLAW_COMMERCE_API_KEY environment variable/test endpoint:
curl "$API_BASE/test" \
-H "X-OpenClaw-Commerce-Token: $OPENCLAW_COMMERCE_API_KEY"
If format validation fails:
occ_. Please check and try again."Note: Without a valid API key, no operations can be performed. The agent must not proceed with any API calls until a valid key is configured.
every request MUST pass these controls:
queries/ and only replace the clearly marked placeholder values. Do not concatenate raw user text into the GraphQL body and do not execute ad-hoc fragments.{ } $ ! # ; etc.) unless explicitly required for that field./^gid:\/\/shopify\/[A-Za-z]+\/[0-9]+$/, ISO-8601 timestamps, enumerations for statuses, etc.). If validation fails, explain the issue and ask for corrected input.Only after those checks succeed should the agent call the API.
Base URL: https://app.openclawcommerce.com/api/v1
In examples below, $API_BASE refers to the URL above.
/testcurl "$API_BASE/test" \
-H "X-OpenClaw-Commerce-Token: $OPENCLAW_COMMERCE_API_KEY"
/operation{{order_id}}, {{status}}).curl -X POST $API_BASE/operation \
-H 'Content-Type: application/json' \
-H 'X-OpenClaw-Commerce-Token: {$OPENCLAW_COMMERCE_API_KEY}' \
-d '{"query": "$QUERY"}'
OpenClaw serves Shopify merchants who are business owners, not technical developers. When communicating with users:
Example Communication:
Error Response Format: Always provide clear, business-friendly error messages that help merchants understand what happened and what to do next.
{
"error": "Error message here"
}
400 - Invalid field configuration or missing parameters401 - Invalid or missing API key500 - Server error or GraphQL execution failurefirst values for connectionsX-OpenClaw-Commerce-Token header