Reputation: 1
Help me php fix code add New images to Bigcommerce Add New Product in Bigcommerce via API V2
$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"
);
error: 400 The field 'videos' cannot be written to. Please remove it from your request before trying again. or: 400The field 'image_file' is not supported by this resource.
https://developer.bigcommerce.com/api/v2/#create-a-product <= no show add image
Upvotes: 0
Views: 149
Reputation: 3260
I'm not sure about videos, but the image file should be local, not a URL.
Upvotes: 0