Documentação da tabela grupos
Endpoints de grupos da integração MPM+ (POST, GET e PUT).
Base de produção: https://mobtef.conexaoapi.com.br/mpm.
Base de homologação: https://mobtef-homolog.conexaoapi.com.br/mpm.
Tabela grupos
POST /grupos
POST
https://mobtef.conexaoapi.com.br/mpm/grupos
Campos e tipos (headers)
| Campo | Tipo |
|---|---|
| empresa_id | int |
| token | string |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| Content-Type | string (application/json) |
Exemplo de headers
[
{ "key": "empresa_id", "value": 980 },
{ "key": "token", "value": "980663439286631" },
{ "key": "dispositivo_id", "value": 1 },
{ "key": "dispositivo_model", "value": 1 },
{ "key": "dispositivo_tipo", "value": 1 },
{ "key": "app_versao", "value": 1 },
{ "key": "app_nome", "value": "MEGA" },
{ "key": "plataforma", "value": "WEB" },
{ "key": "Content-Type", "value": "application/json" }
]
Campos e tipos (body da requisição)
| Campo | Tipo |
|---|---|
| nome | string (obrigatório) |
| integracao | string |
| path_imagem | string |
| mobile | bool |
Body da requisição
{
"nome": "PAPELARIA 11",
"integracao": "MEUCODIGO",
"path_imagem": "https://meupdvmovel.com.br/docs/sanduiche.jpg",
"mobile": true
}
cURL (produção)
curl --location 'https://mobtef.conexaoapi.com.br/mpm/grupos' \
--header 'empresa_id: 980' \
--header 'token: 980663439286631' \
--header 'dispositivo_id: 1' \
--header 'dispositivo_model: 1' \
--header 'dispositivo_tipo: 1' \
--header 'app_versao: 1' \
--header 'app_nome: MEGA' \
--header 'plataforma: WEB' \
--header 'Content-Type: application/json' \
--data '{
"nome": "PAPELARIA 11",
"integracao": "MEUCODIGO",
"path_imagem": "https://meupdvmovel.com.br/docs/sanduiche.jpg",
"mobile": true
}'
Campos e tipos (resposta)
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
Exemplo de resposta
{
"status": "sucess",
"message": "Criado com sucesso.",
"data": [
{
"id": 584
}
]
}
Exemplo no novo modelo de requisição: https://mobtef.conexaoapi.com.br/mpm/grupos.
GET /grupos
GET
https://mobtef.conexaoapi.com.br/mpm/grupos
O GET pode ser usado para sincronização por data (atualizacao) ou para buscar um registro específico informando grupo_id no header.
Campos e tipos (headers)
| Campo | Tipo |
|---|---|
| empresa_id | int |
| token | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| atualizacao | string (data) — opcional (sincronização) |
| grupo_id | int — opcional (consulta de um grupo) |
Exemplo de headers
[
{ "key": "empresa_id", "value": 8 },
{ "key": "token", "value": 8041023 },
{ "key": "dispositivo_id", "value": 1 },
{ "key": "dispositivo_model", "value": 1 },
{ "key": "dispositivo_tipo", "value": 1 },
{ "key": "app_versao", "value": 1 },
{ "key": "app_nome", "value": "MEGA" },
{ "key": "plataforma", "value": "WEB" },
{ "key": "grupo_id", "value": 584 }
]
cURL (homologação)
curl --location 'https://mobtef-homolog.conexaoapi.com.br/mpm/grupos' \
--header 'empresa_id: 8' \
--header 'token: 8041023' \
--header 'dispositivo_id: 1' \
--header 'dispositivo_model: 1' \
--header 'dispositivo_tipo: 1' \
--header 'app_versao: 1' \
--header 'app_nome: MEGA' \
--header 'plataforma: WEB' \
--header 'grupo_id: 584'
Campos e tipos (resposta)
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
| data[].nome | string |
| data[].path_imagem | string | null |
| data[].codigo | string |
| data[].integracao | string | null |
| data[].ativo | bool |
Exemplo de resposta
{
"status": "success",
"message": "Operação realizada com sucesso.",
"data": [
{
"id": 584,
"nome": "PAPELARIA",
"path_imagem": null,
"codigo": "1515",
"integracao": null,
"ativo": true
}
]
}
PUT /grupos
PUT
https://mobtef.conexaoapi.com.br/mpm/grupos
No PUT, informe grupo_id no header para identificar o registro que será atualizado.
Campos e tipos (headers)
| Campo | Tipo |
|---|---|
| empresa_id | int |
| token | string |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| grupo_id | int |
| Content-Type | string (application/json) |
Exemplo de headers
[
{ "key": "empresa_id", "value": 980 },
{ "key": "token", "value": "980663439286631" },
{ "key": "dispositivo_id", "value": 1 },
{ "key": "dispositivo_model", "value": 1 },
{ "key": "dispositivo_tipo", "value": 1 },
{ "key": "app_versao", "value": 1 },
{ "key": "app_nome", "value": "MEGA" },
{ "key": "plataforma", "value": "WEB" },
{ "key": "grupo_id", "value": 1891 },
{ "key": "Content-Type", "value": "application/json" }
]
Campos e tipos (body da requisição)
| Campo | Tipo |
|---|---|
| nome | string |
| path_imagem | string |
| mobile | bool |
| ativo | bool |
Body da requisição
{
"nome":"PAPEIS E FORMULARIOS",
"path_imagem":"https://caminhodaimagem.com.br/imagem.png",
"mobile": false,
"ativo": false
}
cURL (produção)
curl --location --request PUT 'https://mobtef.conexaoapi.com.br/mpm/grupos' \
--header 'empresa_id: 980' \
--header 'token: 980663439286631' \
--header 'dispositivo_id: 1' \
--header 'dispositivo_model: 1' \
--header 'dispositivo_tipo: 1' \
--header 'app_versao: 1' \
--header 'app_nome: MEGA' \
--header 'plataforma: WEB' \
--header 'grupo_id: 1891' \
--header 'Content-Type: application/json' \
--data '{
"nome":"PAPEIS E FORMULARIOS",
"path_imagem":"https://caminhodaimagem.com.br/imagem.png",
"mobile": false,
"ativo": false
}'
Campos e tipos (resposta)
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
| data[].nome | string |
| data[].path_imagem | string |
| data[].codigo | string |
| data[].ativo | bool |
| data[].integracao | string | null |
Exemplo de resposta
{
"status": "success",
"message": "Atualizado com sucesso.",
"data": [
{
"id": 584,
"nome": "PAPEIS E FORMULARIOS",
"path_imagem": "https://caminhodaimagem.com.br/imagem.png",
"codigo": "21567",
"ativo": true,
"integracao": null
}
]
}
Exemplo no novo modelo de requisição: https://mobtef.conexaoapi.com.br/mpm/grupos.