Shopify
Last updated
Was this helpful?
Last updated
Was this helpful?
The Shopify action sends requests to the . It supports both REST and GraphQL requests.
Important Notice
Shopify is deprecating the Shopify Admin REST API which the Mechanic REST objects depend on. The first round of deprecations involve the product and variant endpoints. Read about the deprecation and . Use the going forward. The and objects will cease to work on on Feb 1, 2025 due to the changes being made by Shopify. Shopify will phase out the REST API completely over time, you can read more about this .
All of our will be ported to use GraphQL only, which will provide a model for how you can update your custom tasks. You'll be able to update your non-customized library tasks with a click of a button Please see these for migrating your custom tasks to GraphQL.
This action has several usage styles, each with a different set of constraints on action options.
This usage style invokes the . In this style, a single GraphQL query string is supplied as the action options. The tag has specific support for this action type, allowing this string to be provided as the contents of an action block.
Option
Description
query
Required; a string containing a GraphQL query
variables
Required; a JSON object mapping variable names to values
This example shows how the query and variables may be built up separately, and provided to the action using concise tag syntax.
Important Notice
Operation Must be one of "create"
, "update"
, or "delete"
.
Resource specification When creating, use a single string (e.g. "customer"
). When updating or deleting, use an array (e.g. ["customer", 123]
).
An object of attributes Only applies to creating and updating.
This example creates a (minimal) customer record.
This example appends a line to the order note (assuming a task subscription to shopify/orders/create).
This example deletes a product, having a certain ID.
Important Notice
Operation Must be one of "get"
, "post"
, "put"
, or "delete"
This example creates a (minimal) customer record.
This example appends a line to the order note (assuming a task subscription to shopify/orders/create).
This example deletes a product, having a certain ID.
This usage style invokes the , and supports combining GraphQL queries with . This can be useful for re-using queries with multiple inputs, and is critical when dealing with very large pieces of input. Because GraphQL queries (excluding whitespace) are limited in length to 50k characters, GraphQL variables can be used in cases when large inputs (like Base64-encoded images) need to be submitted.
Shopify is deprecating the Shopify Admin REST API which the Mechanic REST objects depend on. The first round of deprecations involve the product and variant endpoints. Read about the deprecation and . Use the going forward. The and objects will cease to work on on Feb 1, 2025 due to the changes being made by Shopify. Shopify will phase out the REST API completely over time, you can read more about this .
All of our will be ported to use GraphQL only, which will provide a model for how you can update your custom tasks. You'll be able to update your non-customized library tasks with a click of a button Please see these for migrating your custom tasks to GraphQL.
This usage style invokes the . It accepts an array of option values, containing these elements in order:
Shopify is deprecating the Shopify Admin REST API which the Mechanic REST objects depend on. The first round of deprecations involve the product and variant endpoints. Read about the deprecation and . Use the going forward. The and objects will cease to work on on Feb 1, 2025 due to the changes being made by Shopify. Shopify will phase out the REST API completely over time, you can read more about this .
All of our will be ported to use GraphQL only, which will provide a model for how you can update your custom tasks. You'll be able to update your non-customized library tasks with a click of a button Please see these for migrating your custom tasks to GraphQL.
This usage style invokes . It accepts an array of option values, containing these elements in order:
Request path The entire, literal request path to use, including the requested β e.g. "/admin/api/2020-01/orders.json"
A JSON object of attributes In general, this means a wrapper object whose key is named after the current resource type, and whose value is the same set of data that would be used in the style