Shopify Integration Guide
Connect your Shopify store to HQ via the Admin API.
Architecture
Unlike WordPress, Shopify doesn't support server-side plugins. Instead, the Hub communicates directly with your Shopify store via the Admin API (GraphQL).
HQ Hub → Shopify Admin API → Blog Articles
Setup
1. Create a Shopify App
- Go to Shopify Partners
- Create a new app
- Set the app URL to your Hub instance
- Configure OAuth scopes:
read_content,write_content
2. Get API Credentials
- Install the app on your store
- Copy the Admin API access token
- Add to your Hub
.env:
SHOPIFY_STORE=your-store.myshopify.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxxxxxx
3. Configure in Hub
- In Hub admin, go to Websites → Create
- Enter your Shopify store URL
- Select "Shopify" as the connector type
Field Mapping
| HQ Field | Shopify Field |
|---|---|
title | Article title |
body_html | Article body_html |
slug | Article handle |
featured_image | Article image |
meta.title | SEO title |
meta.description | SEO description |
published | Article status |
Rate Limits
Shopify enforces rate limits:
- REST API: 50 requests/second (leaky bucket)
- GraphQL: Variable based on query cost
The Hub automatically handles rate limit retries.
Media Handling
Shopify handles media differently than WordPress:
- Featured images are set via the article
imagefield - Inline images must be uploaded via the Files API first, then referenced in
body_html
Required Scopes
| Scope | Purpose |
|---|---|
read_content | Read blogs and articles |
write_content | Create/update/delete articles |
read_files | Read uploaded files |
write_files | Upload media files |