错误通过API V2在Bigcommerce中添加新图像产品

时间:2017-07-12 05:57:04

标签: php bigcommerce

帮我修改代码将新图片添加到Bigcommerce 通过API V2在Bigcommerce中添加新产品

$data_array = array(
    'name'=>'product name', 
    "type"=> "physical",
    'description' =>'description of product', 
    'price' =>'21.98', 
    'retail_price' =>'21.98', 
    'weight' =>'0.5', 
    'depth' =>'12', 
    "categories" => [23],
    "availability"=> "available", 
    'inventory_level' =>'0',
    "videos" =>  "https://www.youtube.com/watch?v=VNxnvMbmvN0",
    "image_file" =>  "http://www.codefixup.com/wp-content/uploads/2016/09/add-products-in-jet-com-via-api.png"
);
  

错误:400字段'视频'无法写入。请在重试之前将其从请求中删除。   或:400The field' image_file'此资源不支持。

https://developer.bigcommerce.com/api/v2/#create-a-product< =没有显示添加图片

1 个答案:

答案 0 :(得分:0)

我不确定视频,但图片文件应该是本地的,而不是网址。