I want to insert products from a csv-file into the Magento DB via the REST API. First I try to update one single product.
The product is inserted into the db but this product needs to be assigned to a category.
How do I get the productID from the result?
// post method $restClient->setMethod('POST'); $restClient->setRawBody(json_encode($data)); //Make REST request $response = $restClient->send();
Because I have to make another call for the catagory.
$restClient->setUri($apiURL . '/products/' . $id . '/categories'); $restClient->setRawBody(); //will be filled with the categoryID
When I dump the $response, the content is protected and gives me a lot of questionmarks.
When I say:
The body is empty = ''
I don't think it would be necessary to make another call for getting the last product update/insert