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
GET /representatives
Seção intitulada “GET /representatives”Representantes ativos com região e comissão
curl -X GET "https://api.nivesistemas.com.br/representatives" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/representatives", { method: "GET", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "GET", "https://api.nivesistemas.com.br/representatives", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /representatives/performance
Seção intitulada “GET /representatives/performance”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) |
curl -X GET "https://api.nivesistemas.com.br/representatives/performance" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/representatives/performance", { method: "GET", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "GET", "https://api.nivesistemas.com.br/representatives/performance", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /representatives/goals
Seção intitulada “GET /representatives/goals”Metas do ano (12 meses por representante)
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
year |
integer | não | Ano |
curl -X GET "https://api.nivesistemas.com.br/representatives/goals" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/representatives/goals", { method: "GET", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "GET", "https://api.nivesistemas.com.br/representatives/goals", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())PUT /representatives/goals
Seção intitulada “PUT /representatives/goals”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$ |
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}'const res = await fetch("https://api.nivesistemas.com.br/representatives/goals", { method: "PUT", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "sellerId": "00000000-0000-0000-0000-000000000000", "year": 1, "month": 1, "targetAmount": 0 }),});const data = await res.json();import requests
res = requests.request( "PUT", "https://api.nivesistemas.com.br/representatives/goals", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "sellerId": "00000000-0000-0000-0000-000000000000", "year": 1, "month": 1, "targetAmount": 0 },)print(res.json())DELETE /representatives/goals
Seção intitulada “DELETE /representatives/goals”Remover meta
curl -X DELETE "https://api.nivesistemas.com.br/representatives/goals" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/representatives/goals", { method: "DELETE", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "DELETE", "https://api.nivesistemas.com.br/representatives/goals", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /representatives/goals/copy
Seção intitulada “POST /representatives/goals/copy”Copiar metas de um mês para outro mês ou para o ano todo
curl -X POST "https://api.nivesistemas.com.br/representatives/goals/copy" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/representatives/goals/copy", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/representatives/goals/copy", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
