I am trying to use SOAP to create a category in version 2.2 of magento, in the documentation there is not much but I have found that unlike previous versions now the available SOAP methods are not all together but they are divided by services which I can list with a url how is this
Then I should look in that list the url of the service and make the calls depending on the service I want to use, for example:
My problem is that I have gone through all the services that could allow creating a category and apparently there is none or I have not found it,
Does anyone know what service allows me to create a category?
$wsdlUrl = 'http://local.pruebas-magento/soap/all?wsdl&services=catalogCategoryRepositoryV1'; $context = stream_context_create($opts); $soapClient = new SoapClient($wsdlUrl, ['version' => SOAP_1_2, 'context' => $context]); // $soapResponse = $soapClient->__getFunctions(); // Params $objCat->category = new \stdClass; $objCat->categoryId = NULL; $objCat->category->name = "SOAP Cat"; $objCat->category->isActive = true; // Call $soapResponse = $soapClient->catalogCategoryRepositoryV1Get($objCat);
Is it possible for you to use REST instead of SOAP?
Here you'll find an example for category creation: http://devdocs.magento.com/swagger/#!/catalogCategoryRepositoryV1/catalogCategoryRepositoryV1SavePos...