Shopify API and GraphQL API
This topic explains how to configure a call to the Shopify API and to a generic GraphQL API. Follow the instructions below.
1.Press the toolbar command. Alternatively, select the menu item Insert | Shopify/GraphQL.
2.In the dialog that opens, you can choose between calling the Shopify API or a generic GraphQL API (screenshot below).
3.If you want to call the Shopify API, fill in the relevant connection details in the dialog and click Continue in the Shopify section. For details about the Shopify settings, see Shopify API below. If you want to call a generic GraphQL API, click Continue in the Generic GraphQL section.
In either case, clicking Continue opens the GraphQL Settings dialog, in which you need to define the connection settings, configure the HTTP security settings (if necessary), add relevant header parameters, and create a query or a mutation.
Shopify API
To connect to the Shopify API, you need to provide the details described below.
Setting | Description |
---|---|
Shop name | The shop name is a unique identifier for a Shopify store and is used as a subdomain of myshopify.com. For example, a store with the shop name my-cool-shop will have the URL my-cool-shop.myshopify.com. The shop name is required to make API request URLs.
|
Choose API | You can choose between the Admin API and the Storefront API. The Admin API is used for managing store data (e.g., updating and fulfilling orders, retrieving customer details, configuring store settings). The Storefront API is used for customer-facing interactions (e.g., retrieving product listings, creating carts, processing checkouts).
|
Access token | An Admin API access token is a unique credential used to authenticate API requests to the Shopify Admin API. This access token grants access to various store-management features (e.g., products, orders, and customers).
A Storefront API access token is a unique credential that allows public access to store data, such as products and collections. While it does not require user authentication, it is still tied to a Shopify app and must be configured with the correct permissions.
|
Choose API version | Shopify releases a new API version every quarter. Each version is supported for one year before becoming obsolete. When you make API requests, you need to specify the relevant API version to ensure compatibility with your app (e.g., 2025-01).
|