API updates
The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Learn about the changes to the product-related elements in version 2024-04 of the GraphQL and REST Admin APIs.
Anchor to New queries for variant and option resource limitsNew queries for variant and option resource limits
To determine the total number of variants and options that can be added to each product in a shop, you can now query a shop's product variants and options resource limits using ShopResourceLimits:
POST https://{shop}.myshopify.com/api/{api_version}/graphql.json
Anchor to Mutations for managing product options and variantsMutations for managing product options and variants
For apps with an interactive UI workflow.
Anchor to New mutations to manage product optionsNew mutations to manage product options
We've added the following mutations to the GraphQL Admin API that enable you to manage product options directly:
Anchor to Updated inputs to manage option valuesUpdated inputs to manage option values
To manage option values with the new product model, we've added an optionValues field to the variants input on the following mutations in the GraphQL Admin API:
-
We've also added a
productOptionsfield to the input on theproductCreatemutation.
Anchor to New mutation for syncing product dataNew mutation for syncing product data
For apps with a database sync workflow.
We've added the productSet mutation to the GraphQL Admin API, to create and update the state of a product per an external database. The mutation is available to sync in both asynchronous and synchronous modes. It has a productOption and a variants input. The variants input has an optionValues input for pulling product and variant data from the external database.
Use this mutation when you're managing the state of the product model outside of Shopify, and want to update Shopify's product model state to reflect your external state. Examples are Enterprise Resource Planning (ERP) systems and Worksheets.
The productSet mutation has an input limit of 2K variants when run asynchronously and only 100 variants when run synchronously.
Anchor to Deprecated GraphQL component fieldsDeprecated Graph QL component fields
The following table lists deprecated fields and what you should use instead.
| Component | Deprecated | Use instead |
|---|---|---|
productCreate | ProductInput.options field | ProductInput.productOptions field |
productCreate | ProductInput.variants field | productVariantsBulkCreate |
productUpdate | ProductInput.options field | |
productUpdate | ProductInput.variants field | |
productVariantsBulkCreate | variants.options field | variants.optionValues field |
productVariantsBulkUpdate | variants.options field | variants.optionValues field |
ProductInput | images field | Learn more about managing media. |
Anchor to Deprecated REST endpointsDeprecated REST endpoints
The following REST endpoints and their operations are being deprecated:
-
products -
products/{product-id}/variantsLearn more about addressing your use cases with the GraphQL Admin API's queries for retrieving data and mutations for adding and editing data.
Anchor to Webhook updatesWebhook updates
-
A
variant_gidsfield will be retroactively added to all webhook versions. The field will list all variant GIDs in the formatvariant_gids: [{admin_graphql_api_id: ID!}]. -
Product webhooks will return a full variants payload for the first 100 records. For variants 101+, the payload won't include the full variant details, but the
variant_gidsfield will still be included for these variants.The following is an example payload: