Shopify Developer Reference
Comprehensive reference for professional Shopify development - API version 2026-01.
Quick Reference
| Item |
Value |
| API version |
2026-01 (stable) |
| GraphQL Admin |
POST https://{store}.myshopify.com/admin/api/2026-01/graphql.json |
| Storefront API |
POST https://{store}.myshopify.com/api/2026-01/graphql.json |
| Ajax API (theme) |
/cart.js, /cart/add.js, /cart/change.js |
| CLI install |
npm install -g @shopify/cli |
| Theme dev |
shopify theme dev --store {store}.myshopify.com |
| App dev |
shopify app dev |
| Deploy |
shopify app deploy |
| Docs |
shopify.dev |
Choose Your Path
Read the reference file(s) that match your task:
Liquid templating - writing or debugging .liquid files:
- references/liquid-syntax.md - Tags, control flow, iteration, whitespace, LiquidDoc
- references/liquid-filters.md - All filter categories with examples
- references/liquid-objects.md - Product, collection, cart, customer, and global objects
Theme development - building or customising themes:
- references/theme-development.md - OS 2.0 architecture, sections, blocks, JSON templates, settings schema
API integration - fetching or modifying data programmatically:
- references/api-admin.md - GraphQL Admin API (primary), REST (legacy), OAuth, webhooks, rate limiting
- references/api-storefront.md - Storefront API, Ajax API, cart operations
App development - building Shopify apps:
- references/app-development.md - Shopify CLI, extensions, Polaris Web Components, App Bridge
Serverless logic - custom business rules:
- references/functions.md - Shopify Functions (replacing Scripts), Rust/JS targets, deployment
Headless commerce - custom storefronts:
- references/hydrogen.md - Hydrogen framework, React Router 7, Storefront API integration
Optimisation and troubleshooting:
- references/performance.md - Images, JS, CSS, fonts, Liquid, Core Web Vitals
- references/debugging.md - Liquid errors, API errors, cart issues, webhook failures
Deprecation Notices
| Deprecated |
Replacement |
Deadline |
| Shopify Scripts |
Shopify Functions |
August 2025 (migration), sundown TBD |
| checkout.liquid |
Checkout Extensibility |
August 2024 (Plus), done |
| REST Admin API |
GraphQL Admin API |
Active deprecation (no removal date yet) |
| Legacy custom apps |
New auth model |
January 2025 (done) |
| Polaris React |
Polaris Web Components |
Active migration |
| Remix (app framework) |
React Router 7 |
Hydrogen 2025.5.0+ |
Liquid Essentials
Three syntax types:
{{ product.title | upcase }} {# Output with filter #}
{% if product.available %}In stock{% endif %} {# Logic tag #}
{% assign sale = product.price | times: 0.8 %} {# Assignment #}
{%- if condition -%}Stripped whitespace{%- endif -%}
Key patterns:
{% for product in collection.products limit: 5 %}
{% render 'product-card', product: product %}
{% endfor %}
{% paginate collection.products by 12 %}
{% for product in paginate.collection.products %}...{% endfor %}
{{ paginate | default_pagination }}
{% endpaginate %}
API Essentials
// GraphQL Admin - always use GraphQL over REST
const response = await fetch(`https://${store}.myshopify.com/admin/api/2026-01/graphql.json`, {
method: 'POST',
headers: {
'X-Shopify-Access-Token': accessToken,
'Content-Type': 'application/json',
},
body: JSON.stringify({ query, variables }),
})
const { data, errors } = await response.json()
if (errors) throw new Error(errors[0].message)
// Ajax API (theme-only cart operations)
fetch('/cart/add.js', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ id: variantId, quantity: 1 }),
})
Reference Files
| File |
Lines |
Coverage |
| liquid-syntax.md |
~600 |
Tags, control flow, iteration, variables, whitespace, LiquidDoc |
| liquid-filters.md |
~870 |
String, numeric, array, Shopify-specific, date, URL, colour filters |
| liquid-objects.md |
~695 |
All Shopify objects: product, variant, collection, cart, customer, order, etc. |
| theme-development.md |
~1200 |
File structure, JSON templates, sections, blocks, settings schema, layout |
| api-admin.md |
~595 |
GraphQL queries/mutations, REST (legacy), OAuth, webhooks, rate limiting |
| api-storefront.md |
~235 |
Storefront API, Ajax API, cart operations, Customer Account API |
| app-development.md |
~760 |
CLI, app architecture, extensions, Polaris Web Components, deployment |
| functions.md |
~300 |
Function types, Rust/JS targets, CLI workflow, Scripts migration |
| hydrogen.md |
~375 |
Setup, routing, data loading, Storefront API, deployment |
| performance.md |
~605 |
Images, JS, CSS, fonts, Liquid, third-party scripts, Core Web Vitals |
| debugging.md |
~650 |
Liquid, JavaScript, API, cart, webhook, theme editor troubleshooting |
1---2name: shopify-developer3description: Complete Shopify development reference covering Liquid templating, OS 2.0 themes, GraphQL APIs, Hydrogen, Functions, and performance optimization (API v2026-01). Use when working with .liquid files, building Shopify themes or apps, writing GraphQL queries for Shopify, debugging Liquid errors, creating app extensions, migrating from Scripts to Functions, or building headless storefronts. Triggers on "Shopify", "Liquid template", "Hydrogen", "Storefront API", "theme development", "Shopify Functions", "Polaris". Do NOT use for non-Shopify e-commerce platforms.4---5
6# Shopify Developer Reference
7
8Comprehensive reference for professional Shopify development - API version **2026-01**.
9
10## Quick Reference
11
12| Item | Value |
13| ---------------- | ------------------------------------------------------------------- |
14| API version | `2026-01` (stable) |
15| GraphQL Admin | `POST https://{store}.myshopify.com/admin/api/2026-01/graphql.json` |
16| Storefront API | `POST https://{store}.myshopify.com/api/2026-01/graphql.json` |
17| Ajax API (theme) | `/cart.js`, `/cart/add.js`, `/cart/change.js` |
18| CLI install | `npm install -g @shopify/cli` |
19| Theme dev | `shopify theme dev --store {store}.myshopify.com` |
20| App dev | `shopify app dev` |
21| Deploy | `shopify app deploy` |
22| Docs | [shopify.dev](https://shopify.dev) |
23
24## Choose Your Path
25
26Read the reference file(s) that match your task:
27
28**Liquid templating** - writing or debugging `.liquid` files:
29
30- [references/liquid-syntax.md](references/liquid-syntax.md) - Tags, control flow, iteration, whitespace, LiquidDoc
31- [references/liquid-filters.md](references/liquid-filters.md) - All filter categories with examples
32- [references/liquid-objects.md](references/liquid-objects.md) - Product, collection, cart, customer, and global objects
33
34**Theme development** - building or customising themes:
35
36- [references/theme-development.md](references/theme-development.md) - OS 2.0 architecture, sections, blocks, JSON templates, settings schema
37
38**API integration** - fetching or modifying data programmatically:
39
40- [references/api-admin.md](references/api-admin.md) - GraphQL Admin API (primary), REST (legacy), OAuth, webhooks, rate limiting
41- [references/api-storefront.md](references/api-storefront.md) - Storefront API, Ajax API, cart operations
42
43**App development** - building Shopify apps:
44
45- [references/app-development.md](references/app-development.md) - Shopify CLI, extensions, Polaris Web Components, App Bridge
46
47**Serverless logic** - custom business rules:
48
49- [references/functions.md](references/functions.md) - Shopify Functions (replacing Scripts), Rust/JS targets, deployment
50
51**Headless commerce** - custom storefronts:
52
53- [references/hydrogen.md](references/hydrogen.md) - Hydrogen framework, React Router 7, Storefront API integration
54
55**Optimisation and troubleshooting**:
56
57- [references/performance.md](references/performance.md) - Images, JS, CSS, fonts, Liquid, Core Web Vitals
58- [references/debugging.md](references/debugging.md) - Liquid errors, API errors, cart issues, webhook failures
59
60## Deprecation Notices
61
62| Deprecated | Replacement | Deadline |
63| --------------------- | ---------------------- | ---------------------------------------- |
64| Shopify Scripts | Shopify Functions | August 2025 (migration), sundown TBD |
65| checkout.liquid | Checkout Extensibility | August 2024 (Plus), done |
66| REST Admin API | GraphQL Admin API | Active deprecation (no removal date yet) |
67| Legacy custom apps | New auth model | January 2025 (done) |
68| Polaris React | Polaris Web Components | Active migration |
69| Remix (app framework) | React Router 7 | Hydrogen 2025.5.0+ |
70
71## Liquid Essentials
72
73Three syntax types:
74
75```liquid
76{{ product.title | upcase }} {# Output with filter #}
77{% if product.available %}In stock{% endif %} {# Logic tag #}
78{% assign sale = product.price | times: 0.8 %} {# Assignment #}
79{%- if condition -%}Stripped whitespace{%- endif -%}
80```
81
82Key patterns:
83
84```liquid
85{% for product in collection.products limit: 5 %}
86 {% render 'product-card', product: product %}
87{% endfor %}
88
89{% paginate collection.products by 12 %}
90 {% for product in paginate.collection.products %}...{% endfor %}
91 {{ paginate | default_pagination }}
92{% endpaginate %}
93```
94
95## API Essentials
96
97```javascript
98// GraphQL Admin - always use GraphQL over REST
99const response = await fetch(`https://${store}.myshopify.com/admin/api/2026-01/graphql.json`, {
100 method: 'POST',
101 headers: {
102 'X-Shopify-Access-Token': accessToken,
103 'Content-Type': 'application/json',
104 },
105 body: JSON.stringify({ query, variables }),
106})
107const { data, errors } = await response.json()
108if (errors) throw new Error(errors[0].message)
109
110// Ajax API (theme-only cart operations)
111fetch('/cart/add.js', {
112 method: 'POST',
113 headers: { 'Content-Type': 'application/json' },
114 body: JSON.stringify({ id: variantId, quantity: 1 }),
115})
116```
117
118## Reference Files
119
120| File | Lines | Coverage |
121| ------------------------------------------------------- | ----- | ------------------------------------------------------------------------------ |
122| [liquid-syntax.md](references/liquid-syntax.md) | ~600 | Tags, control flow, iteration, variables, whitespace, LiquidDoc |
123| [liquid-filters.md](references/liquid-filters.md) | ~870 | String, numeric, array, Shopify-specific, date, URL, colour filters |
124| [liquid-objects.md](references/liquid-objects.md) | ~695 | All Shopify objects: product, variant, collection, cart, customer, order, etc. |
125| [theme-development.md](references/theme-development.md) | ~1200 | File structure, JSON templates, sections, blocks, settings schema, layout |
126| [api-admin.md](references/api-admin.md) | ~595 | GraphQL queries/mutations, REST (legacy), OAuth, webhooks, rate limiting |
127| [api-storefront.md](references/api-storefront.md) | ~235 | Storefront API, Ajax API, cart operations, Customer Account API |
128| [app-development.md](references/app-development.md) | ~760 | CLI, app architecture, extensions, Polaris Web Components, deployment |
129| [functions.md](references/functions.md) | ~300 | Function types, Rust/JS targets, CLI workflow, Scripts migration |
130| [hydrogen.md](references/hydrogen.md) | ~375 | Setup, routing, data loading, Storefront API, deployment |
131| [performance.md](references/performance.md) | ~605 | Images, JS, CSS, fonts, Liquid, third-party scripts, Core Web Vitals |
132| [debugging.md](references/debugging.md) | ~650 | Liquid, JavaScript, API, cart, webhook, theme editor troubleshooting |