Documentação da integração MPM+
Documentação da integração com foco nas tabelas produtos, grupos e unidades.
Base de produção: https://mobtef.conexaoapi.com.br/mpm.
Base de homologação: https://mobtef-homolog.conexaoapi.com.br/mpm.
Visão geral
Escopo desta página
Esta versão inclui os endpoints das tabelas produtos, grupos e unidades (POST, GET e PUT), conforme solicitado.
| Ambiente | Base URL |
|---|---|
| Produção | https://mobtef.conexaoapi.com.br/mpm |
| Homologação | https://mobtef-homolog.conexaoapi.com.br/mpm |
Nos exemplos abaixo, as rotas estão apontadas para produção. Para homologação, troque apenas a base URL.
Mensagens de erro
Retornos nas rotas
| Mensagem | Quando ocorre |
|---|---|
| Token Inválido | Quando necessário. |
| Sem dados | Quando no id ou período não houver registros. |
| Parâmetros Inválidos | Quando algum campo obrigatório está vazio. |
Tabela produtos
POST /produtos
| Campo | Tipo |
|---|---|
| empresa_id | int |
| usuario_id | int |
| token | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| Content-Type | string (application/json) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "usuario_id", "value": 141 },
{ "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": "Content-Type", "value": "application/json" }
]
| Campo | Tipo |
|---|---|
| codigo | string |
| nome | string (obrigatório) |
| grupo_id | int |
| unidade_id | int (obrigatório) |
| preco | double (obrigatório) |
| estoque | double |
| path_imagem | string | null |
| integracao | string |
| fiscal_id | int |
| cean | string |
| cest | string |
| ncm | string |
{
"codigo": "1201",
"nome": "COCA-COLA LATA 350ML",
"grupo_id": 584,
"unidade_id": 120,
"preco": 6.5,
"estoque": 80,
"path_imagem": null,
"integracao": "PRODUTO_1201",
"fiscal_id": 2,
"cean": "7894900011517",
"cest": "1704702",
"ncm": "22021000"
}
curl --location 'https://mobtef-homolog.conexaoapi.com.br/mpm/produtos' \
--header 'empresa_id: 8' \
--header 'usuario_id: 141' \
--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 'Content-Type: application/json' \
--data '{
"codigo": "1201",
"nome": "COCA-COLA LATA 350ML",
"grupo_id": 584,
"unidade_id": 120,
"preco": 6.5,
"estoque": 80,
"path_imagem": null,
"integracao": "PRODUTO_1201",
"fiscal_id": 2,
"cean": "7894900011517",
"cest": "1704702",
"ncm": "22021000"
}'
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
{
"status": "success",
"message": "Criado com sucesso.",
"data": [
{
"id": 901
}
]
}
GET /produtos
O GET pode ser usado para sincronização por data (atualizacao) ou para buscar um registro específico informando produto_id no header.
| Campo | Tipo |
|---|---|
| empresa_id | int |
| token | int |
| usuario_id | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| atualizacao | string (data) — opcional (sincronização) |
| produto_id | int — opcional (consulta de um produto) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "token", "value": 8041023 },
{ "key": "usuario_id", "value": 141 },
{ "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": "produto_id", "value": 901 }
]
curl --location 'https://mobtef-homolog.conexaoapi.com.br/mpm/produtos' \
--header 'empresa_id: 8' \
--header 'token: 8041023' \
--header 'usuario_id: 141' \
--header 'dispositivo_id: 1' \
--header 'dispositivo_model: 1' \
--header 'dispositivo_tipo: 1' \
--header 'app_versao: 1' \
--header 'app_nome: MEGA' \
--header 'plataforma: WEB' \
--header 'produto_id: 901'
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
| data[].codigo | string |
| data[].nome | string |
| data[].estoque | double |
| data[].unidade_id | int |
| data[].preco | double |
| data[].ativo | bool |
| data[].grupo_id | int |
| data[].integracao | string | null |
| data[].cean | string | null |
| data[].cest | string | null |
| data[].ncm | string | null |
{
"status": "success",
"message": "Operação realizada com sucesso.",
"data": [
{
"id": 901,
"codigo": "1201",
"nome": "COCA-COLA LATA 350ML",
"estoque": 80,
"unidade_id": 120,
"preco": 6.5,
"ativo": true,
"grupo_id": 584,
"integracao": "PRODUTO_1201",
"cean": "7894900011517",
"cest": "1704702",
"ncm": "22021000"
}
]
}
PUT /produtos
No PUT, informe produto_id no header para identificar o registro que será atualizado.
| Campo | Tipo |
|---|---|
| empresa_id | int |
| usuario_id | int |
| token | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| produto_id | int |
| Content-Type | string (application/json) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "usuario_id", "value": 141 },
{ "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": "produto_id", "value": 901 },
{ "key": "Content-Type", "value": "application/json" }
]
| Campo | Tipo |
|---|---|
| codigo | string |
| nome | string |
| grupo_id | int |
| unidade_id | int |
| preco | double |
| estoque | double |
| path_imagem | string | null |
| ativo | bool |
{
"codigo": "1201",
"nome": "COCA-COLA LATA 350ML",
"grupo_id": 584,
"unidade_id": 120,
"preco": 7.0,
"estoque": 120,
"path_imagem": null,
"ativo": true
}
curl --location --request PUT 'https://mobtef-homolog.conexaoapi.com.br/mpm/produtos' \
--header 'empresa_id: 8' \
--header 'usuario_id: 141' \
--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 'produto_id: 901' \
--header 'Content-Type: application/json' \
--data '{
"codigo": "1201",
"nome": "COCA-COLA LATA 350ML",
"grupo_id": 584,
"unidade_id": 120,
"preco": 7.0,
"estoque": 120,
"path_imagem": null,
"ativo": true
}'
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
| data[].nome | string |
| data[].codigo | string |
| data[].ativo | bool |
{
"status": "success",
"message": "Atualizado com sucesso.",
"data": [
{
"id": 901,
"nome": "COCA-COLA LATA 350ML",
"codigo": "1201",
"ativo": true
}
]
}
Tabela grupos
POST /grupos
| Campo | Tipo |
|---|---|
| empresa_id | int |
| usuario_id | int |
| token | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| Content-Type | string (application/json) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "usuario_id", "value": 141 },
{ "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": "Content-Type", "value": "application/json" }
]
| Campo | Tipo |
|---|---|
| nome | string (obrigatório) |
| path_imagem | string | null |
| codigo | string |
| mobile | bool |
{
"nome": "PAPELARIA",
"path_imagem": null,
"codigo": "1515",
"mobile": true
}
curl --location 'https://mobtef-homolog.conexaoapi.com.br/mpm/grupos' \
--header 'empresa_id: 8' \
--header 'usuario_id: 141' \
--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 'Content-Type: application/json' \
--data '{
"nome": "PAPELARIA",
"path_imagem": null,
"codigo": "1515",
"mobile": true
}'
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
{
"status": "sucess",
"message": "Criado com sucesso.",
"data": [
{
"id": 584
}
]
}
Exemplo validado no Postman em homologação: https://mobtef-homolog.conexaoapi.com.br/mpm/grupos.
GET /grupos
O GET pode ser usado para sincronização por data (atualizacao) ou para buscar um registro específico informando grupo_id no header.
| Campo | Tipo |
|---|---|
| empresa_id | int |
| token | int |
| usuario_id | 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) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "token", "value": 8041023 },
{ "key": "usuario_id", "value": 141 },
{ "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 --location 'https://mobtef-homolog.conexaoapi.com.br/mpm/grupos' \
--header 'empresa_id: 8' \
--header 'token: 8041023' \
--header 'usuario_id: 141' \
--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'
| 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 |
{
"status": "success",
"message": "Operação realizada com sucesso.",
"data": [
{
"id": 584,
"nome": "PAPELARIA",
"path_imagem": null,
"codigo": "1515",
"integracao": null,
"ativo": true
}
]
}
PUT /grupos
No PUT, informe grupo_id no header para identificar o registro que será atualizado.
| Campo | Tipo |
|---|---|
| empresa_id | int |
| usuario_id | int |
| token | int |
| 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) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "usuario_id", "value": 141 },
{ "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 },
{ "key": "Content-Type", "value": "application/json" }
]
| Campo | Tipo |
|---|---|
| nome | string |
| path_imagem | string |
| codigo | string |
| mobile | bool |
| ativo | bool |
{
"nome":"PAPEIS E FORMULARIOS",
"path_imagem":"https://caminhodaimagem.com.br/imagem.png",
"codigo": "21567",
"mobile": true,
"ativo": true
}
curl --location --request PUT 'https://mobtef-homolog.conexaoapi.com.br/mpm/grupos' \
--header 'empresa_id: 8' \
--header 'usuario_id: 141' \
--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' \
--header 'Content-Type: application/json' \
--data '{
"nome":"PAPEIS E FORMULARIOS",
"path_imagem":"https://caminhodaimagem.com.br/imagem.png",
"codigo": "21567",
"mobile": true,
"ativo": true
}'
| 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 |
{
"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 validado no Postman em homologação: https://mobtef-homolog.conexaoapi.com.br/mpm/grupos.
Tabela unidades
POST /unidades
| Campo | Tipo |
|---|---|
| empresa_id | int |
| usuario_id | int |
| token | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| Content-Type | string (application/json) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "usuario_id", "value": 141 },
{ "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": "Content-Type", "value": "application/json" }
]
| Campo | Tipo |
|---|---|
| sigla | varchar(5) (obrigatório) |
| unidade | varchar(100) (obrigatório) |
| casas_decimais | int (obrigatório) |
| codigo | int |
| integracao | varchar(50) |
{
"sigla": "UN",
"unidade": "UNIDADE",
"casas_decimais": 2,
"codigo": 10,
"integracao": "UNIDADE_PADRAO"
}
curl --location 'https://mobtef-homolog.conexaoapi.com.br/mpm/unidades' \
--header 'empresa_id: 8' \
--header 'usuario_id: 141' \
--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 'Content-Type: application/json' \
--data '{
"sigla": "UN",
"unidade": "UNIDADE",
"casas_decimais": 2,
"codigo": 10,
"integracao": "UNIDADE_PADRAO"
}'
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
{
"status": "success",
"message": "Criado com sucesso.",
"data": [
{
"id": 120
}
]
}
GET /unidades
O GET pode ser usado para sincronização por data (atualizacao) ou para buscar um registro específico informando unidade_id no header.
| Campo | Tipo |
|---|---|
| empresa_id | int |
| token | int |
| usuario_id | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| atualizacao | string (data) — opcional (sincronização) |
| unidade_id | int — opcional (consulta de uma unidade) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "token", "value": 8041023 },
{ "key": "usuario_id", "value": 141 },
{ "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": "unidade_id", "value": 120 }
]
curl --location 'https://mobtef-homolog.conexaoapi.com.br/mpm/unidades' \
--header 'empresa_id: 8' \
--header 'token: 8041023' \
--header 'usuario_id: 141' \
--header 'dispositivo_id: 1' \
--header 'dispositivo_model: 1' \
--header 'dispositivo_tipo: 1' \
--header 'app_versao: 1' \
--header 'app_nome: MEGA' \
--header 'plataforma: WEB' \
--header 'unidade_id: 120'
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
| data[].sigla | varchar(5) |
| data[].casas_decimais | int |
{
"status": "success",
"message": "Operação realizada com sucesso.",
"data": [
{
"id": 120,
"sigla": "UN",
"casas_decimais": 2
}
]
}
PUT /unidades
No PUT, informe unidade_id no header para identificar o registro que será atualizado.
| Campo | Tipo |
|---|---|
| empresa_id | int |
| usuario_id | int |
| token | int |
| dispositivo_id | int |
| dispositivo_model | int |
| dispositivo_tipo | int |
| app_versao | int |
| app_nome | string |
| plataforma | string |
| unidade_id | int |
| Content-Type | string (application/json) |
[
{ "key": "empresa_id", "value": 8 },
{ "key": "usuario_id", "value": 141 },
{ "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": "unidade_id", "value": 120 },
{ "key": "Content-Type", "value": "application/json" }
]
| Campo | Tipo |
|---|---|
| sigla | varchar(5) |
| unidade | varchar(100) |
| casas_decimais | int |
| codigo | int |
| integracao | varchar(50) |
| ativo | bool |
{
"sigla": "UN",
"unidade": "UNIDADE",
"casas_decimais": 2,
"codigo": 10,
"integracao": "UNIDADE_PADRAO",
"ativo": true
}
curl --location --request PUT 'https://mobtef-homolog.conexaoapi.com.br/mpm/unidades' \
--header 'empresa_id: 8' \
--header 'usuario_id: 141' \
--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 'unidade_id: 120' \
--header 'Content-Type: application/json' \
--data '{
"sigla": "UN",
"unidade": "UNIDADE",
"casas_decimais": 2,
"codigo": 10,
"integracao": "UNIDADE_PADRAO",
"ativo": true
}'
| Campo | Tipo |
|---|---|
| status | string |
| message | string |
| data | array |
| data[].id | int |
| data[].sigla | varchar(5) |
| data[].casas_decimais | int |
| data[].ativo | bool |
{
"status": "success",
"message": "Atualizado com sucesso.",
"data": [
{
"id": 120,
"sigla": "UN",
"casas_decimais": 2,
"ativo": true
}
]
}