Pular para o conteúdo

Representantes comerciais

Região, meta mensal e comissão por representante. Disponível apenas no segmento Fábrica de tintas.

Base: https://api.nivesistemas.com.br · 6 endpoints

Representantes ativos com região e comissão

Janela do terminal
curl -X GET "https://api.nivesistemas.com.br/representatives" \
-H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \
-H "X-Store-Slug: loja-demo"

Desempenho do mês: vendas, meta, % da meta, ranking e totais por região

Query params

Campo Tipo Obrigatório Descrição
year integer não Ano
month integer não Mês (1-12)
Janela do terminal
curl -X GET "https://api.nivesistemas.com.br/representatives/performance" \
-H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \
-H "X-Store-Slug: loja-demo"

Metas do ano (12 meses por representante)

Query params

Campo Tipo Obrigatório Descrição
year integer não Ano
Janela do terminal
curl -X GET "https://api.nivesistemas.com.br/representatives/goals" \
-H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \
-H "X-Store-Slug: loja-demo"

Definir meta do mês (0 remove)

Corpo (JSON)

Campo Tipo Obrigatório Descrição
sellerId uuid sim Representante
year integer sim Ano
month integer sim Mês
targetAmount number sim Meta em R$
Janela do terminal
curl -X PUT "https://api.nivesistemas.com.br/representatives/goals" \
-H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \
-H "X-Store-Slug: loja-demo" \
-H "Content-Type: application/json" \
-d '{"sellerId":"00000000-0000-0000-0000-000000000000","year":1,"month":1,"targetAmount":0}'

Remover meta

Janela do terminal
curl -X DELETE "https://api.nivesistemas.com.br/representatives/goals" \
-H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \
-H "X-Store-Slug: loja-demo"

Copiar metas de um mês para outro mês ou para o ano todo

Janela do terminal
curl -X POST "https://api.nivesistemas.com.br/representatives/goals/copy" \
-H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \
-H "X-Store-Slug: loja-demo"