DEV Community

Cover image for How to Call Shopify API in Postman (With Access Tokens)
Lucy
Lucy

Posted on

How to Call Shopify API in Postman (With Access Tokens)

If you work with Shopify APIs, testing your endpoints quickly and securely is crucial. That’s where Postman comes in — a tool that helps developers send, inspect, and debug API requests without writing a single line of code.

In this guide, you’ll learn how to call the Shopify Admin API in Postman using access tokens, configure your environment, and test real API requests step-by-step.

1.Understanding Shopify API and Access Tokens

The Shopify Admin API lets developers interact with a store’s data — products, orders, customers, or inventory — through secure endpoints.
Each request must include an access token, which verifies that you’re authorized to access the store.

You can obtain this token from a Custom App in your Shopify admin:

  • Go to Apps → Develop Apps → Create App
  • Under “Configuration,” choose the Admin API Scopes you need (Products, Orders, Customers)
  • Install the app and copy your Admin API Access Token

Keep this token secret. It’s the key to communicating with your store via the API.

2. Setting up Postman for Shopify API

  1. Open Postman and click Environments → Add New.

  2. Add the following variables:

  • store_domain:your-store.myshopify.com
  • api_version: 2024-10
  • access_token: your secure Admin API token
  1. Create a Base URL variable:
{{base_url}} = https://{{store_domain}}/admin/api/{{api_version}}

Enter fullscreen mode Exit fullscreen mode

This setup ensures your URLs remain dynamic and easy to update when Shopify releases new API versions.

3. Adding Required Headers

Every Shopify API request needs two key headers:

X-Shopify-Access-Token: {{access_token}}
Content-Type: application/json
Enter fullscreen mode Exit fullscreen mode

You can set these in Postman under the Headers tab or define them at the collection level so they apply to all requests.

4. Testing a GET Request (Fetch Products)

Request Type: GET
URL:

{{base_url}}/products.json?limit=5

Enter fullscreen mode Exit fullscreen mode

Headers:

X-Shopify-Access-Token: {{access_token}}

Enter fullscreen mode Exit fullscreen mode

Click Send, and if your token and permissions are correct, you’ll see a JSON response like this:

{
  "products": [
    {
      "id": 123456789,
      "title": "Sample Product",
      "status": "active"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

5. Creating a Product (POST Request)

Once your GET call works, let’s create a product via the API.

Request Type: POST
URL:

{{base_url}}/products.json

Enter fullscreen mode Exit fullscreen mode

Body (raw JSON):

{
  "product": {
    "title": "Postman Created Tee",
    "body_html": "Made via Postman",
    "vendor": "Demo Brand",
    "variants": [
      { "option1": "Small", "price": "29.99" },
      { "option1": "Large", "price": "34.99" }
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Hit Send, and you’ll get a success response containing the new product’s id.
You can confirm it appears in your Shopify Admin → Products section.

6. Querying Shopify with GraphQL

Shopify also supports GraphQL — a faster and more flexible API format.

Request Type: POST
URL:

{{base_url}}/graphql.json

Enter fullscreen mode Exit fullscreen mode

Body:

{
  "query": "query { products(first:5) { edges { node { id title status } } } }"
}
Enter fullscreen mode Exit fullscreen mode

GraphQL returns only the fields you specify, making responses smaller and faster. It’s especially useful when integrating with dashboards or analytics tools.

7. Handling Pagination and Rate Limits

If you have many products, Shopify uses cursor-based pagination.
Check the Linkheader in your response for a page_info parameter, which tells you how to fetch the next page.

You should also monitor:

X-Shopify-Shop-Api-Call-Limit: 10/80

Enter fullscreen mode Exit fullscreen mode

8. Troubleshooting Common Issues

9. Best Practices for Secure Testing

  • Store your access token in Postman Environment Variables, not in plain text.
  • Never share exported collections with live tokens.
  • Update api_version regularly to stay compatible.
  • Limit app scopes to only what’s required (e.g., Products or Orders).

11. When to Get Professional Help

If you’re managing large stores or require advanced automation beyond testing, collaborating with a professional team is beneficial.
An experienced Shopify Store Development company can set up secure API integrations, automate product sync, and build private apps that streamline workflows.
For enterprises or high-volume retailers, partnering with a Shopify Plus Agency ensures API architecture and performance are optimized for scale.

And if you’re exploring custom integration, automation, or app development, experienced Shopify experts or a dedicated team of Hire Shopify developers can help you implement powerful, secure solutions quickly.

12. Conclusion

Calling the Shopify API in Postman is one of the best ways to explore what’s possible with your store’s data.
Once you know how to authenticate with access tokens, add headers, and send REST or GraphQL requests, you can test and automate everything from product imports to order tracking.

This hands-on knowledge lays the foundation for deeper app development, integrations, and automation—whether you’re a developer experimenting with APIs or managing a full-scale Shopify setup for clients.

Top comments (0)