Learn about the changes to the product-related elements in version 2024-04 of the GraphQL and REST Admin APIs.
## New 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`](docs/api/admin-graphql/unstable/objects/ShopResourceLimits):
## Mutations for managing product options and variants
> Tip:
> For apps with an [interactive UI workflow](/docs/apps/build/graphql/migrate/new-product-model/product-model-components#interactive-ui-workflow).
### New mutations to manage product options
We’ve added the following mutations to the GraphQL Admin API that enable you to manage product options directly:
- [`productOptionsCreate`](/docs/api/admin-graphql/unstable/mutations/productOptionsCreate)
- [`productOptionUpdate`](/docs/api/admin-graphql/unstable/mutations/productOptionUpdate)
- [`productOptionsReorder`](/docs/api/admin-graphql/unstable/mutations/productOptionsReorder)
- [`productOptionsDelete`](/docs/api/admin-graphql/unstable/mutations/productOptionsDelete)
### Updated 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:
- [`productVariantsBulkCreate`](/docs/api/admin-graphql/unstable/mutations/productVariantsBulkCreate#argument-variants)
- [`productVariantsBulkUpdate`](/docs/api/admin-graphql/unstable/mutations/productVariantsBulkUpdate#argument-variants)
We've also added a `productOptions` field to the input on the [`productCreate`](/docs/api/admin-graphql/unstable/mutations/productCreate#argument-input) mutation.
## New mutation for syncing product data
> Tip:
> For apps with a [database sync workflow](/docs/apps/build/graphql/migrate/new-product-model/product-model-components#database-sync-workflow).
We've added the [`productSet`](/docs/api/admin-graphql/unstable/mutations/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](/docs/apps/build/graphql/migrate/new-product-model/sync-data). 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`](/docs/api/admin-graphql/latest/mutations/productSet) mutation has an input limit of 2K variants when run asynchronously and only 100 variants when run synchronously.
## Deprecated GraphQL component fields
The following table lists deprecated fields and what you should use instead.
## Deprecated REST endpoints
The following REST endpoints and their operations are being deprecated:
- `products`
- `products/{product-id}/variants`
Learn more about addressing your use cases with the GraphQL Admin API's queries for [retrieving data](/docs/apps/build/graphql/migrate/new-product-model/retrieve-data) and mutations for [adding](/docs/apps/build/graphql/migrate/new-product-model/add-data) and [editing](/docs/apps/build/graphql/migrate/new-product-model/edit-data) data.
## Webhook updates
- A `variant_gids` field will be retroactively added to all webhook versions. The field will list all variant GIDs in the format `variant_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_gids` field will still be included for these variants.
The following is an example payload: