Hi,
I've been trying to update the product variants on my shopify using the API but I keep getting a 400 error with this text
{"errors":{"product":"Required parameter missing or invalid"}}
I have written some Java Code to do the API calls for me but I can't seem to get it to work
My Request JSON looks like this
{"product":{"id":8325948040,"variants":[{"compare_at_price":"707.00","price":"693.86","id":27820028616}] } }
Thanks
Hi there,
Would you mind sharing what your full request looks like, with any confidential info removed? To update a product, you should be sending a request with PUT to /admin/products/{ID}.json, where {ID} is the product ID.
I passed the following and was able to update a product...and it seems similar to what you're passing. I'm wondering if the problem is with the endpoint?
{
"product": {
"id": 9202071364,
"variants": [
{
"id": 30894305284,
"compare_at_price": "2000.00",
"price": "693.86"
}
]
}
}
Hi,
Here is eveything that I send with the request
URL
https://gnr-solutions.myshopify.com/admin/products/8326045512.json
Headers:
Time to Response: 1.299
Response
{
"errors":{
"product":"Required parameter missing or invalid"
}
}
Updating JSON
{
"product":{
"id":8326045512,
"variants":[
{
"compare_at_price":"169.55",
"price":"166.38",
"id":27820219144
}
]
}
}
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |