Localização de técnicos
Base: https://api.nivesistemas.com.br · 3 endpoints
POST /field/location/ping
Seção intitulada “POST /field/location/ping”Registrar posição do técnico autenticado
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
lat |
number | sim | Latitude |
lng |
number | sim | Longitude |
accuracy |
number | não | Precisão em metros |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/field/location/ping" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"lat":0,"lng":0,"accuracy":0}'const res = await fetch("https://api.nivesistemas.com.br/field/location/ping", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "lat": 0, "lng": 0, "accuracy": 0 }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/field/location/ping", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "lat": 0, "lng": 0, "accuracy": 0 },)print(res.json())GET /field/location/latest
Seção intitulada “GET /field/location/latest”Últimas posições dos técnicos
curl -X GET "https://api.nivesistemas.com.br/field/location/latest" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/field/location/latest", { 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/field/location/latest", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /field/location/pings
Seção intitulada “GET /field/location/pings”Histórico de pings do dia
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
date |
string | sim | YYYY-MM-DD |
userId |
uuid | não | Técnico (padrão: usuário autenticado) |
curl -X GET "https://api.nivesistemas.com.br/field/location/pings" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/field/location/pings", { 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/field/location/pings", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
