Updating options values of Product via Admin API

Topic summary

A developer successfully created a product with options (Color, Size) and variants using Shopify’s REST Admin API POST endpoint. However, when attempting to update option values (adding “Green” to the Color option) via the PUT endpoint, the option values remained unchanged, despite the endpoint working correctly for updating option names.

Key Issue:

  • PUT request to update product options doesn’t modify the values array
  • The developer also explored GraphQL Admin API solutions without success

Official Response:
Shopify support advised against using the product endpoint for variant/option modifications, as it can be destructive—omitting variant IDs during updates causes those variants to be deleted.

Recommended Solution:
Use dedicated endpoints instead:

The REST documentation includes examples of changing option names. The discussion remains open regarding the best approach for updating option values specifically.

Summarized with AI on November 23. AI used: claude-sonnet-4-5-20250929.

Hello!

I’ve created product, its options and its variants via endpoint POST /admin/api/2022-10/products.json:

{
  "product": {
    "title": "Main Product",
    "body_html": null,
    "vendor": "Brand name",
    "options": [
      {
        "name": "Color",
        "values": [
          "Red",
          "White"
        ]
      },
      {
        "name": "Size",
        "values": [
          "S",
          "M",
          "L"
        ]
      }
    ],
    "variants": [
      {
        "title": "Prod 1",
        "sku": null,
        "barcode": null,
        "option1": "White",
        "option2": "S"
      },
      {
        "title": "Prod 2",
        "sku": null,
        "barcode": null,
        "option1": "Red",
        "option2": "M"
      },
      {
        "title": "Prod 3",
        "sku": null,
        "barcode": null,
        "option1": "Red",
        "option2": "L"
      }
    ]
  }
}

Then, I’ve tryed to update this product to add option value “Green” via endpoint PUT /admin/api/2022-10/products/12345.json:

{
    "product": {
        "id": 12345,
        "title": "Main product",
        "body_html": null,
        "vendor": "Brand name",
        "options": [
            {
                "id": 111,
                "name": "Color",
                "position": 1,
                "values": [
                    "White",
                    "Red",
                    "Green"
                ]
            },
            {
                "id": 222,
                "name": "Size",
                "position": 2,
                "values": [
                    "S",
                    "M",
                    "L"
                ]
            }
        ]
    }
}

If I try to change option name, this endpoint work perfectly. But options values didn’t change.

Also I looked for a way to update options values via GraphQL Admin API. But a working solution couldn’t be reached.

Can anyone suggest a way to update option values via Admin API (REST or GraphQL doesn’t matter)?

Thanks in advance!

Hi @Vlad_BWT !

You generally don’t want to use the product endpoint to make changes to product variants (option) as it tends to be destructive. For example, when updating a product’s variants, if you don’t include the IDs of every other variant that you’re not updating those variants will be deleted! So, if you find yourself using the product endpoint to make changes to variants and something “isn’t working”, it’s probably to save you the headache of accidentally destroying your work.

That’s some more general advice but to answer your question you would want to use either the REST Product Variant resource or the GraphQL productVariantUpdate mutation. The REST page includes an example of changing the name of an option (the PUT example).