Query customer orders and profile using the Shopify Customer Account API GraphQL endpoint

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. After obtaining a Customer Account API access_token via OAuth, determine the correct Customer Account API GraphQL endpoint — it is at a Shopify-hosted URL specific to your store; check current docs for the exact host pattern
  2. Send a POST request to the GraphQL endpoint with Content-Type: application/json, Authorization: Bearer <access_token>, and a body with a query field containing your GraphQL query
  3. Query the customer root field for profile data: customer { firstName lastName emailAddress { emailAddress } defaultAddress { address1 city country } }
  4. Query customer orders with pagination: customer { orders(first: 10, after: $cursor) { nodes { id name processedAt totalPrice { amount currencyCode } lineItems(first: 5) { nodes { title quantity } } } pageInfo { hasNextPage endCursor } } }
  5. Handle the pageInfo.hasNextPage and endCursor for cursor-based pagination when a customer has many orders; iterate until hasNextPage is false
  6. For address management use the customerAddressCreate, customerAddressUpdate, and customerAddressDelete mutations on the same endpoint

Known gotchas

Related routes

Query Shopify customer segments programmatically via Admin GraphQL
shopify.dev · 6 steps · unrated
Implement Shopify Customer Account API OAuth flow in a Hydrogen app to authenticate buyers and access account data
shopify.dev · 6 steps · unrated
Define Shopify metaobject definitions and create metaobject entries via Admin GraphQL for structured storefront content
ecommerce-ops · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans