How to hit the Shopify API

Shopify's Admin API is GraphQL at https://<shop>.myshopify.com/admin/api/<version>/graphql.json. The older REST Admin API is legacy, and new public apps must use GraphQL.

Authentication

In your store admin, create a custom app under Settings → Apps and sales channels → Develop apps, give it Admin API scopes, and install it to get an access token. Send it as the X-Shopify-Access-Token header. In the examples it's written {{SHOPIFY_ACCESS_TOKEN}}; {{SHOP}} is the part before .myshopify.com.

Full reference: https://shopify.dev/docs/api/admin-graphql

Get shop info

curl -X POST https://{{SHOP}}.myshopify.com/admin/api/2026-07/graphql.json \
  -H "X-Shopify-Access-Token: {{SHOPIFY_ACCESS_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ shop { name email myshopifyDomain } }"}'
Run in PostTaco

List products

curl -X POST https://{{SHOP}}.myshopify.com/admin/api/2026-07/graphql.json \
  -H "X-Shopify-Access-Token: {{SHOPIFY_ACCESS_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ products(first: 5) { edges { node { id title status totalInventory } } } }"}'
Run in PostTaco

Recent orders

Needs the read_orders scope.

curl -X POST https://{{SHOP}}.myshopify.com/admin/api/2026-07/graphql.json \
  -H "X-Shopify-Access-Token: {{SHOPIFY_ACCESS_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ orders(first: 5, reverse: true) { edges { node { name createdAt totalPriceSet { shopMoney { amount currencyCode } } } } } }"}'
Run in PostTaco