Andriy
October 17, 2017, 4:15pm
1
Hi there,
I have the following request:
Veeqo::Product.update(5864196, {product:{product_variants_attributes:[{id: 11216115, title: ''}]}}.merge(connection: User.find(6).veeqo_connection))
That produced 404 error.
I think I can’t set empty title for products with only one sellable right now.
It would be great if you can check that
Thanx
PS:
I’ve checked that product, and I have that sellable with that id present inside:
Veeqo::Product.find(5864196, connection: User.find(6).veeqo_connection)[:sellables].pluck(:id)
D, [2017-10-17T16:13:37.672808 #4] DEBUG -- : User Load (4.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
=> [11216115]
phil
October 17, 2017, 4:35pm
2
Title is a required field for products and product_variants
Andriy
October 17, 2017, 4:39pm
3
Phil,
Take a look on product with id 8929630.
Sellables look like:
Here I have empty title.
Because I’m here with same problem(duplicating product titles in order).
phil
October 17, 2017, 4:50pm
4
Andriy, does it work if you try and set the title to “.” or_“null”_
I think the way it works is the request gets 404’d if the title field is empty.
I’m not in the office at the moment so I can’t test anything myself till tomorrow.
Andriy
October 17, 2017, 4:51pm
5
Yep, I can try
Thanks Phil
I’ll keep you updated
Andriy
October 17, 2017, 4:53pm
6
I tried both nil and ., also even string “HELLO” does not work. Still 404 error.
phil
October 17, 2017, 5:02pm
7
Can you try including the product_title in with the request.
{product: {title: ‘Unchanged-Title’, product_variants_attributes:[{id: …and so on
Andriy
October 17, 2017, 5:05pm
8
Same thing here
404 error
phil
October 17, 2017, 5:12pm
9
I’m out of ideas for now. I’ll have another look first thing tomorrow.
Andriy
October 17, 2017, 5:13pm
10
Okay, I’ll wait for your response.
Thanks a lot
phil
October 18, 2017, 8:34am
11
I can’t replicate this error at the moment.
The below json request worked on a product with just one sellable.
{
"product": {
"title": "Bobble Hat - Title",
"product_variants_attributes": [
{
"id": 14504036,
"title": ""
}
]
}
}
Ill investigate your product specifically now.
phil
October 18, 2017, 8:44am
12
Unfortunately ID: 11216115
is a kit, unfortunately kits are not editable through the API at present.
Andriy
October 18, 2017, 8:56am
13
Okay:c
thanx a lot for answer)