Regras fiscais parametrizadas (ICMS-ST)
Motor de regras por UF, NCM, CEST e tipo de operação. Complementa o cadastro simples em /tax-rules.
Base: https://api.nivesistemas.com.br · 5 endpoints
GET /fiscal-rules
Seção intitulada “GET /fiscal-rules”Listar regras fiscais
curl -X GET "https://api.nivesistemas.com.br/fiscal-rules" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/fiscal-rules", { 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/fiscal-rules", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /fiscal-rules/:id
Seção intitulada “GET /fiscal-rules/:id”Detalhe da regra
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/fiscal-rules/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/fiscal-rules/{id}", { 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/fiscal-rules/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /fiscal-rules
Seção intitulada “POST /fiscal-rules”Criar regra fiscal
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
originUf |
string | não | UF de origem |
destUf |
string | não | UF de destino |
ncm |
string | não | NCM |
cest |
string | não | CEST |
operationType |
string | não | SALE_INTERNAL | SALE_INTERSTATE | RETURN | ENTRY | … |
stSituation |
string | não | NOT_SUBJECT | SUBJECT | RETAINED_PREVIOUSLY | … |
cfop |
string | não | CFOP |
icmsCsosn |
string | não | CSOSN |
icmsCst |
string | não | CST ICMS |
active |
boolean | não | Ativa |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/fiscal-rules" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"originUf":"","destUf":"","ncm":"","cest":"","operationType":"","stSituation":"","cfop":"","icmsCsosn":"","icmsCst":"","active":true}'const res = await fetch("https://api.nivesistemas.com.br/fiscal-rules", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "originUf": "", "destUf": "", "ncm": "", "cest": "", "operationType": "", "stSituation": "", "cfop": "", "icmsCsosn": "", "icmsCst": "", "active": true }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/fiscal-rules", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "originUf": "", "destUf": "", "ncm": "", "cest": "", "operationType": "", "stSituation": "", "cfop": "", "icmsCsosn": "", "icmsCst": "", "active": True },)print(res.json())PATCH /fiscal-rules/:id
Seção intitulada “PATCH /fiscal-rules/:id”Atualizar regra fiscal
Parâmetros de rota: id
curl -X PATCH "https://api.nivesistemas.com.br/fiscal-rules/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/fiscal-rules/{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/fiscal-rules/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())DELETE /fiscal-rules/:id
Seção intitulada “DELETE /fiscal-rules/:id”Desativar regra fiscal
Parâmetros de rota: id
Resposta: 204 No Content
curl -X DELETE "https://api.nivesistemas.com.br/fiscal-rules/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/fiscal-rules/{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/fiscal-rules/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
