製品のカスタム フィールドを更新しようとしています。
管理インターフェースから手動で行う方法に関するガイドを見つけました
API ドキュメントでは、製品のカスタム フィールドを直接変更することはできず、アクセスのみが可能であることが示唆されています。
次に考えたのは、製品を更新することでした
これは、製品の既存の custom_field です。
{
"url"=> "https://storename.mybigcommerce.com/api/v2/products/32/customfields.json",
"resource"=>"/products/32/customfields"
}
URL/リソースを変更し、ハッシュを更新のために送り返そうとすると、400 Bad Request
:(
new_custom_fields = {
"url" => "https://storename.mybigcommerce.com/api/v2/products/75/customfields.json",
"resource" => "/products/75/customfields"
}
api.update_products(75, {"custom_fields" => new_custom_fields})
RuntimeError: Failed to parse Bigcommerce response: 400 Bad Request
考え?