problem in creating product images is always empty

Highlighted
Shopify Partner
3 0 0

hi 

I am new to shopify app development i have an issue. I am creating product using admin api here is the code

 

$modify_data = array(
"product" => array(
"title" => "customized Lighter",
"body_html"=> "<strong>customized Lighter!</strong>",
"vendor"=> "Lighter",
"product_type"=> "Snowboard",
"tags"=> "Barnes & Noble, John's Fav, \"Big Air\"",
"images" => array(
array(
"attachment" => "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\n"
)
)
)
);

 

shopify_call($token, $shop, "/admin/api/2019-10/products.json", $product, 'POST');

 

put image array is always empty. 

 

can any one help

0 Likes
Highlighted
Shopify Staff
Shopify Staff
643 78 141

Hey @umer01,

 

In order to investigate this further, can you kindly provide the X-Request-ID from the response headers of the call? This will allow me to find the call in our logs and hopefully find more details regarding an error. As well, please provide the full base64 string for the image you're attempting to upload, and we will investigate this further for you.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes