我期待更新產品上的自定義字段。如何使用BigCommerce API更新自定義字段?
我the guide on how to do it manually via the admin interface
的API docs發現表明,你不能直接修改的自定義字段上的產品,只能訪問他們:
我的下一個念頭,就是update the product
這是產品上現有的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
思考招呼?
感謝您的URL清理:) – manderson 2013-05-06 19:11:24