Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

63
Views
Editing Product Options Using the Shopify API

I am trying to edit a product's option values in Shopify. Essentially, I want to pass a reordered array for products[0].options[0].values

enter image description here

Using Shopify's REST API docs, I make a request like so:

import {Product} from '@shopify/shopify-api/dist/rest-resources/2021-10/index.js';

const test_session = await Shopify.Utils.loadCurrentSession(request, response);

const product = new Product({session: test_session});

product.id = 7758005469437;

product.options[0].values = newOptionsOrder;

await product.save({});

I get the following error:

Cannot read properties of undefined (reading '0')

I was successfuly able to edit the title of the target product using product.title = "New Title"; The issue just seems to be targeting more nested elements.

Any idea how to edit the first options.values array?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!