Segurança química (FISPQ)
FISPQ/FDS, classificação de risco e produtos controlados. Disponível apenas no segmento Fábrica de tintas.
Base: https://api.nivesistemas.com.br · 15 endpoints
GET /chemical-safety
Seção intitulada “GET /chemical-safety”Listar produtos com dados de segurança
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
controlled |
boolean | não | Somente controlados |
missingFispq |
boolean | não | Sem FISPQ |
expiringInDays |
integer | não | FISPQ vencendo em N dias |
q |
string | não | Nome ou número ONU |
curl -X GET "https://api.nivesistemas.com.br/chemical-safety" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety", { 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/chemical-safety", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /chemical-safety/alerts
Seção intitulada “GET /chemical-safety/alerts”FISPQ vencidas, vencendo, ausentes e produtos controlados
curl -X GET "https://api.nivesistemas.com.br/chemical-safety/alerts" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/alerts", { 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/chemical-safety/alerts", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /chemical-safety/controlled-sales
Seção intitulada “GET /chemical-safety/controlled-sales”Vendas de produtos controlados no período
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
from |
string | sim | AAAA-MM-DD |
to |
string | sim | AAAA-MM-DD |
format |
string | não | csv |
curl -X GET "https://api.nivesistemas.com.br/chemical-safety/controlled-sales" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/controlled-sales", { 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/chemical-safety/controlled-sales", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /chemical-safety/products/:productId
Seção intitulada “GET /chemical-safety/products/:productId”Ficha de segurança do produto
Parâmetros de rota: productId
curl -X GET "https://api.nivesistemas.com.br/chemical-safety/products/{productId}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/products/{productId}", { 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/chemical-safety/products/{productId}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())PUT /chemical-safety/products/:productId
Seção intitulada “PUT /chemical-safety/products/:productId”Salvar ficha (ONU, classe de risco, grupo de embalagem, validade da FISPQ, controlado)
Parâmetros de rota: productId
curl -X PUT "https://api.nivesistemas.com.br/chemical-safety/products/{productId}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/products/{productId}", { method: "PUT", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "PUT", "https://api.nivesistemas.com.br/chemical-safety/products/{productId}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /chemical-safety/products/:productId/fispq
Seção intitulada “POST /chemical-safety/products/:productId/fispq”Enviar PDF da FISPQ (campo file, até 10 MB)
Parâmetros de rota: productId
curl -X POST "https://api.nivesistemas.com.br/chemical-safety/products/{productId}/fispq" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/products/{productId}/fispq", { 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/chemical-safety/products/{productId}/fispq", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /chemical-safety/products/:productId/fispq
Seção intitulada “GET /chemical-safety/products/:productId/fispq”Baixar a FISPQ
Parâmetros de rota: productId
curl -X GET "https://api.nivesistemas.com.br/chemical-safety/products/{productId}/fispq" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/products/{productId}/fispq", { 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/chemical-safety/products/{productId}/fispq", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())DELETE /chemical-safety/products/:productId/fispq
Seção intitulada “DELETE /chemical-safety/products/:productId/fispq”Remover o arquivo da FISPQ
Parâmetros de rota: productId
curl -X DELETE "https://api.nivesistemas.com.br/chemical-safety/products/{productId}/fispq" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/products/{productId}/fispq", { 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/chemical-safety/products/{productId}/fispq", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /chemical-safety/licenses
Seção intitulada “GET /chemical-safety/licenses”Listar licenças da própria fábrica (Polícia Federal, Exército, ANVISA, IBAMA, Bombeiros etc.) com situação de validade
Resposta: Até 500 itens, ativas primeiro e por validade. Cada item traz status VALID, EXPIRING ou EXPIRED.
curl -X GET "https://api.nivesistemas.com.br/chemical-safety/licenses" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/licenses", { 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/chemical-safety/licenses", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /chemical-safety/licenses
Seção intitulada “POST /chemical-safety/licenses”Cadastrar licença (exige a permissão de gerenciar produtos)
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
kind |
string | sim | PF, EXERCITO, ANVISA, IBAMA, BOMBEIROS ou OUTRA |
number |
string | sim | Número da licença (até 80 caracteres) |
validUntil |
string | sim | Validade (AAAA-MM-DD) |
issuer |
string | não | Órgão emissor (até 120 caracteres) |
issuedAt |
string | não | Data de emissão (AAAA-MM-DD); a validade não pode ser anterior |
notes |
string | não | Observações (até 1000 caracteres) |
active |
boolean | não | Licença ativa |
Resposta: 201 Created com a licença
curl -X POST "https://api.nivesistemas.com.br/chemical-safety/licenses" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"kind":"","number":"","validUntil":"","issuer":"","issuedAt":"","notes":"","active":true}'const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/licenses", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "kind": "", "number": "", "validUntil": "", "issuer": "", "issuedAt": "", "notes": "", "active": true }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/chemical-safety/licenses", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "kind": "", "number": "", "validUntil": "", "issuer": "", "issuedAt": "", "notes": "", "active": True },)print(res.json())PATCH /chemical-safety/licenses/:id
Seção intitulada “PATCH /chemical-safety/licenses/:id”Editar licença (mesmos campos do cadastro, todos opcionais; exige a permissão de gerenciar produtos)
Parâmetros de rota: id
Resposta: A licença atualizada. 404 se não existe.
curl -X PATCH "https://api.nivesistemas.com.br/chemical-safety/licenses/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/licenses/{id}", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/chemical-safety/licenses/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())DELETE /chemical-safety/licenses/:id
Seção intitulada “DELETE /chemical-safety/licenses/:id”Excluir licença (exige a permissão de gerenciar produtos)
Parâmetros de rota: id
Resposta: 204 No Content. 404 se não existe.
curl -X DELETE "https://api.nivesistemas.com.br/chemical-safety/licenses/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/licenses/{id}", { 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/chemical-safety/licenses/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /chemical-safety/products/:productId/emergency-sheet
Seção intitulada “GET /chemical-safety/products/:productId/emergency-sheet”Ficha de emergência do produto em PDF (uma página)
Parâmetros de rota: productId
Resposta: application/pdf (inline), sem cache
curl -X GET "https://api.nivesistemas.com.br/chemical-safety/products/{productId}/emergency-sheet" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/products/{productId}/emergency-sheet", { 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/chemical-safety/products/{productId}/emergency-sheet", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /chemical-safety/sale-check
Seção intitulada “POST /chemical-safety/sale-check”Consulta de segurança química antes de finalizar a venda (avisos e bloqueios conforme as regras da loja); não grava nada
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
items |
array | não | Itens avulsos: [{ variantId, productId }] (até 500); alternativa a saleId |
saleId |
uuid | não | Rascunho de venda: os itens são lidos da própria venda |
customerId |
uuid | não | Cliente (para validar licença/cadastro do comprador) |
nature |
string | não | SALE | OWN_CONSUMPTION (consumo próprio não é verificado) |
Resposta: { applicable, blocks: string[], warnings: string[] }. A venda só é bloqueada na finalização se houver blocks.
curl -X POST "https://api.nivesistemas.com.br/chemical-safety/sale-check" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"items":[],"saleId":"00000000-0000-0000-0000-000000000000","customerId":"00000000-0000-0000-0000-000000000000","nature":""}'const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/sale-check", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "items": [], "saleId": "00000000-0000-0000-0000-000000000000", "customerId": "00000000-0000-0000-0000-000000000000", "nature": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/chemical-safety/sale-check", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "items": [], "saleId": "00000000-0000-0000-0000-000000000000", "customerId": "00000000-0000-0000-0000-000000000000", "nature": "" },)print(res.json())GET /chemical-safety/sales/:saleId/emergency-sheets
Seção intitulada “GET /chemical-safety/sales/:saleId/emergency-sheets”Fichas de emergência da venda em PDF (uma página por produto químico)
Parâmetros de rota: saleId
Resposta: application/pdf (inline), sem cache
curl -X GET "https://api.nivesistemas.com.br/chemical-safety/sales/{saleId}/emergency-sheets" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/chemical-safety/sales/{saleId}/emergency-sheets", { 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/chemical-safety/sales/{saleId}/emergency-sheets", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
