# Capítulo VII - Desassociação de produtos e grupos

Contrário ao processo de associação, a desassociação de produtos em grupos de produtos retira o vínculo feito anterior com um grupo de produtos, extinguindo o grupo caso não tenha mais nenhum outro produto associado.

**Método:** POST

- **URL:** https://app.systax.com.br/cadastro-geral/desassociar/products-groups

# Descrição dos campos da chamada

<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" id="bkmrk-campo-pai-descri%C3%A7%C3%A3o-" width="500"><tbody><tr><td>**Campo**

</td><td>**PAI**

</td><td>**Descrição**

</td></tr><tr><td>action

</td><td>-

</td><td>Contém a palavra "desassociar"

</td></tr><tr><td>cod\_interno

</td><td>products\_groups

</td><td>ID do produto (Cliente)

</td></tr><tr><td>origem\_produto

</td><td>products\_groups

</td><td>Origem do produto

</td></tr><tr><td>descricao

</td><td>grupos

</td><td>Descrição do grupo de produtos

</td></tr></tbody></table>

# Descrição dos campos de retorno

<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" id="bkmrk-campo-pai-descri%C3%A7%C3%A3o-" width="575"><tbody><tr><td nowrap="nowrap" width="160">**Campo**

</td><td nowrap="nowrap" width="83">**PAI**

</td><td nowrap="nowrap" width="332">**Descrição**

</td></tr><tr><td nowrap="nowrap" width="160">success

</td><td nowrap="nowrap" width="83">/

</td><td nowrap="nowrap" width="332">Status do retorno

</td></tr><tr><td nowrap="nowrap" width="160">message

</td><td nowrap="nowrap" width="83">/

</td><td nowrap="nowrap" width="332">Mensagem do retorno

</td></tr><tr><td nowrap="nowrap" width="160">itens

</td><td nowrap="nowrap" width="83">/

</td><td nowrap="nowrap" width="332">Quantidade de itens na chamada

</td></tr><tr><td nowrap="nowrap" width="160">itens\_ok

</td><td nowrap="nowrap" width="83">/

</td><td nowrap="nowrap" width="332">Quantidade de itens encontrados (existentes)

</td></tr><tr><td>desassoc\_ok

</td><td>/

</td><td>Confirmação da desassociação

</td></tr><tr><td nowrap="nowrap" width="160">position

</td><td nowrap="nowrap" width="83">assocs\_ok

</td><td nowrap="nowrap" width="332">Posição do item na chamada

</td></tr><tr><td nowrap="nowrap" width="160">cod\_interno

</td><td nowrap="nowrap" width="83">assocs\_ok

</td><td nowrap="nowrap" width="332">ID do produto (Cliente)

</td></tr><tr><td nowrap="nowrap" width="160">origem\_produto

</td><td nowrap="nowrap" width="83">assocs\_ok

</td><td nowrap="nowrap" width="332">Origem do produto

</td></tr><tr><td nowrap="nowrap" width="160">descricao

</td><td nowrap="nowrap" width="83">grupos

</td><td nowrap="nowrap" width="332">Descrição do grupo

</td></tr><tr><td nowrap="nowrap" width="160">msg

</td><td nowrap="nowrap" width="83">grupos

</td><td nowrap="nowrap" width="332">Mensagem de retorno referente a associação

</td></tr><tr><td nowrap="nowrap" width="160">itens\_error

</td><td nowrap="nowrap" width="83">/

</td><td nowrap="nowrap" width="332">Quantidade de itens

</td></tr><tr><td>desassocs\_error

</td><td>/

</td><td>Mensagem de possíveis erros na desassociação

</td></tr></tbody></table>

**Tabela de referência para o campo "success" e "message"**

<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" id="bkmrk-c%C3%B3digo-de-retorno-su" width="305"><tbody><tr><td nowrap="nowrap" width="139">**Código de retorno**

</td><td nowrap="nowrap" width="60">**sucess**

</td><td nowrap="nowrap" width="107">**message**

</td></tr><tr><td nowrap="nowrap" width="139">200

</td><td nowrap="nowrap" width="60">true

</td><td nowrap="nowrap" width="107">OK

</td></tr><tr><td nowrap="nowrap" width="139">400

</td><td width="60">false  
false

</td><td width="107">token\_invalid  
token\_expired

</td></tr><tr><td nowrap="nowrap" width="139">500

</td><td nowrap="nowrap" width="60">false

</td><td nowrap="nowrap" width="107">internal\_error

</td></tr></tbody></table>

**Tabela de referência para o campo "msg"**

<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" id="bkmrk-msg-descri%C3%A7%C3%A3o-assoc_" width="415"><tbody><tr><td nowrap="nowrap" width="156">**msg**

</td><td nowrap="nowrap" width="259">**Descrição**

</td></tr><tr><td nowrap="nowrap" width="156">desassoc\_ok

</td><td nowrap="nowrap" width="259">Desassociação realizada com sucesso

</td></tr><tr><td nowrap="nowrap" width="156">desassoc\_not\_found

</td><td nowrap="nowrap" width="259">Desassociação não efetuada

</td></tr></tbody></table>

# Exemplos de chamada e retorno

**Chamada**

{  
 "action": "desassociar",  
 "products\_groups": \[  
 {  
 "cod\_interno": "10026",  
 "origem\_produto": 0,  
 "grupos": \[  
 {  
 "descricao": "Grupo Teste V1"  
 }  
 \]  
 },  
 {  
 "cod\_interno": "22970",  
 "origem\_produto": 0,  
 "grupos": \[  
 {  
 "descricao": "Grupo Teste V1"  
 }  
 \]  
 }  
 \]  
}

**Retorno**

<span lang="EN-US"> {  
 "success": true,  
 "message": "ok",  
 "itens": 1,  
 "itens\_ok": 1,  
 "desassocs\_ok": \[  
 {  
 "position": 0,  
 "cod\_interno": "10026",  
 "origem\_produto": 0,  
 "grupos": \[  
 {  
 "id": 1187737,  
 "descricao": "Grupo Teste V1",  
 "msg": "desassoc\_ok"  
 }  
 \]  
 }  
 \],  
 "itens\_error": 0,  
 "desassocs\_error": \[\]  
}</span>