Shopify is a cloud-based, fully hosted commerce platform which can be used to create and manage online stores and sell across multiple channels (including web, mobile, social media, online marketplaces, brick-and-mortar locations, and pop-up shops).
A Patchworks app is available in the Shopify marketplace - by installing this app, you create a Patchworks connector with an authenticated instance, instantly.
API documentation for Shopify (used to build this connector) can be found via the link below:
GraphQL is preferred for Shopify APIs - REST API endpoints will be deprecated in the coming months.
Starting in 2025, Shopify will phase out key REST API capabilities. By February 2025, public apps using REST product APIs must migrate to GraphQL, with custom apps needing to follow suit by April 2025 (for handling more than 100 variants).
Additionally, checkout
mutations in REST will be unavailable from April 2025. Shopify strongly recommends transitioning to GraphQL to avoid disruptions and ensure smoother, more efficient integrations.
Please refer to the Shopify API Documentation for details on key deprecation dates.
If you've been using the Shopify connector with REST API endpoints (either installed via our Shopify app or the Patchworks marketplace), we advise updating the connector from the Patchworks marketplace, so GraphQL endpoints are available.
Having updated the Shopify connector, you should then edit process flows where the Shopify connector is used and switch any REST API endpoints to a GraphQL equivalent. If you can't find a GraphQL endpoint that you need, you can add your own.
We strongly recommend installing the Patchworks app from the Shopify marketplace - this creates a connector and adds an authenticated connector instance, seamlessly.
You must have a Patchworks account to install the app. If you don't have an existing account, you can register for a trial account or contact our Sales team.
If Multi-factor authentication is enabled for your Patchworks account, it must be disabled (temporarily) before completing the steps below. Please see Disabling 2FA for your Patchworks login if you're unsure how to do this.
Step 1 Log into your Shopify admin portal and search for the Patchworks app:
Step 2 Review access requirements and click the install button:
Step 3 Click the sign in button:
Step 4 Provide your Patchworks account credentials and sign in:
Step 5 Click install latest version:
Step 6 The connector is installed with an instance - click head to Patchworks to access the Patchworks dashboard:
The instance name is the same as your Shopify store - you can change this later if necessary.
Step 7 In the Patchworks dashboard, you can view your new connector by selecting connectors & instances from the left-hand navigation menu:
...all your installed connectors are displayed, including Shopify:
Step 8 If you disabled Multi-Factor authentication before starting this process, you should enable it again now. Further information can be found in our Two-factor authentication guide.
GraphQL
REST
Shopify is phasing out its REST API capabilities and strongly recommends transitioning to GraphQL. If you've been using the Shopify connector with REST API endpoints, we advise updating the connector from the Patchworks marketplace, so GraphQL endpoints are available.
When browsing endpoints for the latest Shopify connector, you'll find that REST API endpoints are prefixed with the word LEGACY
, and GraphQL
endpoints are available:
A key advantage of GraphQL is that connector endpoints can be configured with queries that request only the data needed, minimising information over and under-fetching.
Our Shopify connector includes a range of predefined GraphQL endpoints with queries for different entity types (products, customers, orders, etc.). However, GraphQL is so flexible that you may want to add custom endpoints to the Shopify connector, with more targeted queries for your needs. This guide walks through the steps needed to achieve this.
Ensure that your Patchworks Shopify connector is up to date. For more information please see Updating a connector.
Our suggested approach for adding custom GraphQL endpoints is to take a copy of an existing endpoint with similar properties and then edit the copy as needed. These steps are detailed in two stages:
Step 1
Log in to the Patchworks dashboard and select process flows
from the left-hand navigation menu:
Step 2
Select connectors & instances
:
Step 3
Click the settings icon
associated with your Shopify connector:
Step 4
You're now in the connector builder - click the endpoints
option:
Step 5
Find an existing GraphQL query that's similar to the one you want to add. For example, if your new query relates to retrieving customer records, the GraphQL Retrieve a list of customers
endpoint would be a good option:
Endpoints are organised by entity type - you can scroll through this list, or CTRL+F or CMD+F to search on the name.
Step 6
Scroll to the right and select the clone
option:
Step 7 You'll see two confirmation messages - the first advising that the clone task is queued and the second confirming when the task is completed (these are typically instant but may take longer in busy times) - for example:
Step 8 Refresh the page (CTRL+ R or CMD+ R). Now you should see a copy of the endpoint with an incremented number in brackets - for example:
Step 1 Click the name of the newly cloned endpoint:
You're now viewing the setup for this endpoint, with general details in the upper panel and a series of tabs in the lower panel:
Step 2 Change the name to reflect the purpose of this endpoint (the name entered here is displayed to users when configuring connector shapes in process flows) - for example:
Step 3 Update remaining fields in this panel, if necessary:
If you started this task by cloning a similar endpoint, you may not need to change the entity type or direction. For further information about these options, please see our connector builder documentation.
Step 4
Move down to the lower panel (where the authentication tab is displayed) and toggle token authentication
to on
:
...you'll see a confirmation message when this authentication method is added:
Step 5
Not all endpoints require variables - check the Shopify API documentation and if needed, click the variables
tab to add them:
For further information about these options, please see our connector builder documentation.
Step 6
Click the URL
tab and set the following options:
HTTP method
PUT
URL
https://{store_name}.myshopify.com/admin/api/2025-01/graphql.json
For example:
Shopify GraphQL queries are executed by sending POST HTTP requests to the following endpoint:
https://{store_name}.myshopify.com/admin/api/2025-01/graphql.json
.
This URL
includes a {store_name}
variable that is resolved from the Shopify store name that's entered when instances for this connector are added and used in process flows - you don't need to change anything here.
Step 7
Click the header
tab. Unless the Shopify API documentation states otherwise, header
information is always the same, so the details shown for your cloned endpoint don't need to be changed:
For reference, the header includes one parameter named X-Shopify-Access-Token
, with a value set to {{token}}
.
Step 8
Click the body
tab - here you'll find the GraphQL query for the endpoint you cloned earlier:
...from here, you can edit the existing query as needed.
Queries for existing GraphQL endpoints (installed with the Shopify connector) include pagination settings - for example:
{ customers(first: 50 query: $query {{pagination_cursor}}) { pageInfo {startCursor hasPreviousPage hasNextPage endCursor}
These work in conjunction with our predefined GraphQL cursor
pagination method, and can be updated as required. You can learn more about GraphQL pagination in Shopify's API documentation.
Step 9
Schemas aren't required for GraphQL queries. With so much flexibility to control what fields are returned by queries, adding a schema can often become confusing and difficult to maintain - general (though not mandatory) advice is to ignore the schema
tab for GraphQL endpoints.
Step 10
Click the pagination
tab and set the following options:
Pagination method
GraphQL Cursor
EndCursor path
data.entity.pageInfo.endCursor/graphql.json
Replace the entity
element with the data element you're querying - for example:
data.customers.pageInfo.endCursor
HasNextPage path
data.entity.pageInfo.hasNextPage
Replace the entity
element with the data element you're querying - for example:
data.customers.pageInfo.hasNextPage
For example:
Step 11 Save changes to return to the list of endpoints:
We strongly recommend installing the Patchworks app from the Shopify marketplace - this creates a connector and adds an authenticated connector instance, seamlessly - there's no need for you to obtain your own tokens for authentication and apply them to your connector instance manually.
However, if for some reason you do need to create/update a Shopify instance manually, this guide shows how to obtain a Shopify token.
When a user chooses to using token-based authentication, the credentials below are prompted:
Whenever a sends a Shopify API request using token-based authentication, Shopify's X-Shopify-Access-Token
option is passed in the request header. The value is set to whatever token was provided when the associated was added.
To obtain an API token, you must access your and create/install a new Patchworks Integration app. At the end of this procedure, you will be given an API token - this token should be used when for your Shopify store for use in .
The steps required are summarised below.
Step 2 Select apps from the left-hand navigation menu:
Step 3 Select App and sales channel settings:
Step 4 Check the URL at the top of the left-hand navigation panel and add it to your password manager, ready for your Patchworks setup:
This is the same URL that you use to log into the admin portal.
Step 5 Click the develop apps for your store button:
Step 6 Click the create an app button:
...the create an app form is displayed:
Step 7 In the app name field, enter an appropriate name. For example:
Step 8 Select an app developer from the dropdown list. This can be the store owner or any staff/collaborator account with the develop apps permission.
Step 9 Click the create app button:
...details for the new app are shown:
Step 9 Go directly to stage 2.
Step 1 Click the configure admin API scopes button:
Step 2 From the admin API access scopes page, select checkboxes to enable all API access scopes:
Step 3 Scroll down to the webhook subscriptions panel and ensure that the (latest) option is selected from the dropdown list:
Step 4 Click the save button at the end of this page:
Step 5 Go directly to stage 3.
Step 1 Click the install app button at the top of the page:
...the API credentials page is displayed.
Step 2 In the top admin API access token panel, click the reveal token once option:
Step 3 Copy this token and add it to your password manager, ready for use in your Patchworks setup:
c
Step 1 Log into the for your store.
If you're creating this app to work with a , there may be a dependency on this name in your installed process flows. Please check the installation guide for any specific requirements for this name.
store_name
The URL used to access a Shopify store always follows the convention:
https://your-store-name.myshopify.com
. For example, the URL for our 'Patchworks Docs Demo' store is:
https://patchworks-docs-demo.myshopify.com
When adding credentials for a new instance, you only need to provide the name of your store - don't enter https://
and don't enter .myshopify.com
. So taking our example, the store would be entered as: patchworks-docs-demo
.
token
Generated in your Shopify admin portal - see the Obtaining credentials tab.