{"id":37663,"date":"2025-07-01T11:56:09","date_gmt":"2025-07-01T10:56:09","guid":{"rendered":"https:\/\/developers.ila.cegid.com\/en\/forum\/comportamento-inconsistente-entre-ambientes-de-teste-e-producao-validacao-do-company-tax-id\/"},"modified":"2025-07-02T14:40:10","modified_gmt":"2025-07-02T13:40:10","slug":"comportamento-inconsistente-entre-ambientes-de-teste-e-producao-validacao-do-company-tax-id","status":"publish","type":"cma_thread","link":"https:\/\/developers.ila.cegid.com\/en\/forum\/comportamento-inconsistente-entre-ambientes-de-teste-e-producao-validacao-do-company-tax-id\/","title":{"rendered":"Comportamento inconsistente entre ambientes de teste e produ\u00e7\u00e3o \u2013 Valida\u00e7\u00e3o do Company Tax ID"},"content":{"rendered":"<p>Estou enfrentando uma situa\u00e7\u00e3o urgente com a valida\u00e7\u00e3o do campo <strong data-start=\"309\" data-end=\"327\">Company Tax ID<\/strong> ao tentar enviar o seguinte payload para o endpoint:<\/p>\n<p>https:\/\/invoicing-engine.primaverabss.com\/api\/{{tenant}}\/{{organization}}\/salesCore\/customerParties<\/p>\n<p>Payload utilizado:<\/p>\n<p>{<br \/>\n&#8220;partyKey&#8221;: &#8220;TESTAVALM1&#8221;,<br \/>\n&#8220;name&#8221;: &#8220;test name&#8221;,<br \/>\n&#8220;companyTaxID&#8221;: &#8220;518199290&#8221;,<br \/>\n&#8220;streetName&#8221;: &#8220;Teststreet 1&#8221;,<br \/>\n&#8220;postalZone&#8221;: &#8220;12345&#8221;,<br \/>\n&#8220;cityName&#8221;: &#8220;Lisbon&#8221;,<br \/>\n&#8220;country&#8221;: &#8220;PT&#8221;<br \/>\n}<\/p>\n<p>Ao enviar esse request no ambiente de <strong data-start=\"764\" data-end=\"773\">teste<\/strong>, recebo o seguinte erro:<\/p>\n<p>[<br \/>\n{<br \/>\n&#8220;memberNames&#8221;: [&#8220;CompanyTaxID&#8221;],<br \/>\n&#8220;message&#8221;: &#8220;The Company Tax ID length must be 11.&#8221;<br \/>\n},<br \/>\n{<br \/>\n&#8220;memberNames&#8221;: [&#8220;Country&#8221;],<br \/>\n&#8220;message&#8221;: &#8220;The Company Tax ID length must be 11.&#8221;<br \/>\n}<br \/>\n]<\/p>\n<p data-start=\"1037\" data-end=\"1142\">No entanto, ao enviar exatamente o mesmo request no ambiente de <strong data-start=\"1101\" data-end=\"1113\">produ\u00e7\u00e3o<\/strong>, tudo funciona corretamente.<\/p>\n<p data-start=\"1144\" data-end=\"1286\">A \u00fanica forma de fazer funcionar no ambiente de teste atualmente \u00e9 adicionando o prefixo &#8220;PT&#8221; ao campo <code data-start=\"1247\" data-end=\"1261\">companyTaxID<\/code>, como no exemplo abaixo:<\/p>\n<p data-start=\"1144\" data-end=\"1286\">{<br \/>\n&#8220;partyKey&#8221;: &#8220;TESTAVALM1&#8221;,<br \/>\n&#8220;name&#8221;: &#8220;test name&#8221;,<br \/>\n&#8220;companyTaxID&#8221;: &#8220;<strong>PT518199290<\/strong>&#8220;,<br \/>\n&#8220;streetName&#8221;: &#8220;Teststreet 1&#8221;,<br \/>\n&#8220;postalZone&#8221;: &#8220;12345&#8221;,<br \/>\n&#8220;cityName&#8221;: &#8220;Lisbon&#8221;,<br \/>\n&#8220;country&#8221;: &#8220;PT&#8221;<br \/>\n}<\/p>\n<p data-start=\"1506\" data-end=\"1700\">Contudo, este n\u00e3o \u00e9 o comportamento desejado, pois preciso que <strong data-start=\"1569\" data-end=\"1619\">ambos os ambientes se comportem da mesma forma<\/strong>, e at\u00e9 a semana passada isso funcionava corretamente <strong data-start=\"1673\" data-end=\"1690\">sem o prefixo<\/strong> em ambos.<\/p>\n<p data-start=\"1702\" data-end=\"1887\">Poderiam, por gentileza, verificar e informar como podemos restaurar o comportamento anterior no ambiente de teste? \u00c9 muito importante para n\u00f3s manter a consist\u00eancia entre os ambientes.<\/p>\n<p data-start=\"1889\" data-end=\"1927\">Agrade\u00e7o desde j\u00e1 pelo suporte r\u00e1pido.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Estou enfrentando uma situa\u00e7\u00e3o urgente com a valida\u00e7\u00e3o do campo Company Tax ID ao tentar enviar o seguinte payload para o endpoint: https:\/\/invoicing-engine.primaverabss.com\/api\/{{tenant}}\/{{organization}}\/salesCore\/customerParties Payload utilizado: { &#8220;partyKey&#8221;: &#8220;TESTAVALM1&#8221;, &#8220;name&#8221;: &#8220;test name&#8221;, &#8220;companyTaxID&#8221;: &#8220;518199290&#8221;, &#8220;streetName&#8221;: &#8220;Teststreet 1&#8221;, &#8220;postalZone&#8221;: &#8220;12345&#8221;, &#8220;cityName&#8221;: &#8220;Lisbon&#8221;, &#8220;country&#8221;: &#8220;PT&#8221; } Ao enviar esse request no ambiente de teste, recebo o seguinte erro: [&hellip;]<\/p>\n","protected":false},"author":1895,"featured_media":0,"template":"","tags":[],"cma_category":[],"cma_difficulty_level":[],"forum-tag":[365,371],"class_list":["post-37663","cma_thread","type-cma_thread","status-publish","hentry","forum-tag-api-endpoints-en","forum-tag-jasmin-en","forum-languages-pt"],"_links":{"self":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_thread\/37663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_thread"}],"about":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/types\/cma_thread"}],"author":[{"embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/users\/1895"}],"wp:attachment":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/media?parent=37663"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/tags?post=37663"},{"taxonomy":"cma_category","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_category?post=37663"},{"taxonomy":"cma_difficulty_level","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_difficulty_level?post=37663"},{"taxonomy":"forum-tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/forum-tag?post=37663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}