Problemas ao criar categorias e subcategorias pelas APIs SOAP de categoria

Ao fazer a seguinte requisição SOAP para adicionar uma nova categoria ao departamento já existente com id igual a 2000001:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:vtex="http://schemas.datacontract.org/2004/07/Vtex.Commerce.WebApps.AdminWcfService.Contracts"> <soapenv:Header/> <soapenv:Body> <tem:CategoryInsertUpdate> <tem:category> <vtex:Description>Descrição da categoria</vtex:Description> <vtex:ParentCategoryId>2000001</vtex:ParentCategoryId> <vtex:IsActive>true</vtex:IsActive> <vtex:Keywords>Foo</vtex:Keywords> <vtex:Name>[Dev] Categoria Teste</vtex:Name> <vtex:Title>Titulo da categoria</vtex:Title> </tem:category> </tem:CategoryInsertUpdate> </soapenv:Body> </soapenv:Envelope>

Ocorre que a nova categoria é criada como departamento (sem a categoria pertencer ao departamento id=2000001):

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <CategoryInsertUpdateResponse xmlns="http://tempuri.org/"> <CategoryInsertUpdateResult xmlns:a="http://schemas.datacontract.org/2004/07/Vtex.Commerce.WebApps.AdminWcfService.Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:AdWordsRemarketingCode i:nil="true"/> <a:Description>Descrição da categoria</a:Description> <!-- Deveria ser ParentCategoryId = 2000001 segundo a documentação --> <a:FatherCategoryId i:nil="true"/> <a:Id>2000004</a:Id> <a:IsActive>true</a:IsActive> <a:Keywords>Foo</a:Keywords> <a:LomadeeCampaignCode i:nil="true"/> <a:Name>[Dev] Categoria Teste</a:Name> <a:Score i:nil="true"/> <a:ShowBrandFilter>false</a:ShowBrandFilter> <a:Title>Titulo da categoria</a:Title> </CategoryInsertUpdateResult> </CategoryInsertUpdateResponse> </s:Body> </s:Envelope>

Alguém já teve esse problema e sabe se é possível resolver?

Estou seguindo a seguinte documentação:

  • https://help.vtex.com/tutorial/integration-guide-for-erps-full-catalog

A VTEX agora já possui API/REST para catálogo, sendo assim, é bom alterar o seu soap para o rest. https://developers.vtex.com/reference/category-and-brand

Quanto ao seu problema, não é parentCategoryId e sim FatherCategoryId

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.