Reputation: 743
How can I get product id while creaing it with REST API at some point in the code product id is passed to this method:
class Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
...
$this->_multicall($product->getId()); #line 172
...
Regards,
Upvotes: 0
Views: 190
Reputation: 743
Ok I did it. I have override Mage_Catalog_Model_Api2_Product_Rest_Admin_V1
with mine and in _create()
before $this->_multicall($product->getId());
I have added:
# Return magento product id in response
$this->getResponse()->setBody(json_encode(array(
'magento_product_id' => $product->getId()
)));
Upvotes: 2