d
Topic
Posts:
1
May 03, 2016

There is a Bug in API : On Adding Multiple Products . This post is outdated

I had used this

Request as JSON : {"product" :[ {
"vendor" : "test vendor",
"variants" : [ {
"weight_unit" : "kg",
"weight" : "0",
"updated_at" : null,
"title" : null,
"taxable" : true,
"sku" : "",
"requires_shipping" : true,
"product_id" : null,
"price" : 0,
"position" : 1,
"option3" : null,
"option2" : null,
"option1" : "Default Title",
"old_inventory_quantity" : 0,
"inventory_quantity" : 0,
"inventory_policy" : "deny",
"inventory_management" : null,
"image_id" : "null",
"id" : null,
"grams" : 0,
"fulfillment_service" : null,
"created_at" : null,
"compare_at_price" : 0,
"barcode" : null
} ],
"updated_at" : null,
"title" : "test product7322",
"template_suffix" : null,
"tags" : null,
"published_scope" : null,
"published_at" : null,
"product_type" : "Gift Card",
"options" : [ ],
"images" : [ ],
"image" : null,
"id" : null,
"handle" : null,
"created_at" : null,
"body_html" : null
} ]}

 

and I had Got This response : {"errors":{"product":"expected Array to be a Hash"}}

 

Please help. in order to solve this.