Fiscal (NFS-e)
Emissão de Nota Fiscal de Serviços (Sistema Nacional). Use API key com permissões nfse.view / nfse.manage e header X-Store-Slug.
Base: https://api.nivesistemas.com.br · 22 endpoints
GET /nfse/readiness
Seção intitulada “GET /nfse/readiness”Prontidão para emissão (certificado, IM, IBGE, etc.)
curl -X GET "https://api.nivesistemas.com.br/nfse/readiness" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/readiness", { 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/nfse/readiness", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /nfse/emit-prep
Seção intitulada “GET /nfse/emit-prep”Pendências para emitir NFS-e de uma OS
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
serviceOrderId |
uuid | sim | ID da ordem de serviço |
tomadorKind |
string | não | PF | PJ | EXTERIOR | UNIDENTIFIED — UNIDENTIFIED não exige CPF/CNPJ do cliente da OS |
Resposta: Checklist estruturado da loja/OS/cliente
curl -X GET "https://api.nivesistemas.com.br/nfse/emit-prep" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/emit-prep", { 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/nfse/emit-prep", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /nfse
Seção intitulada “GET /nfse”Listar NFS-e
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
status |
string | não | DRAFT | PENDING | AUTHORIZED | REJECTED | CANCELLED | MANUAL |
serviceOrderId |
uuid | não | Filtrar por OS |
receivableId |
uuid | não | Filtrar por conta a receber |
page |
number | não | Página (default 1) |
pageSize |
number | não | Itens por página (max 100) |
Resposta: { items, total, page, pageSize }
curl -X GET "https://api.nivesistemas.com.br/nfse" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse", { 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/nfse", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /nfse/:id
Seção intitulada “GET /nfse/:id”Detalhe da NFS-e
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/nfse/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{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/nfse/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /nfse/:id/xml
Seção intitulada “GET /nfse/:id/xml”Baixar XML da NFS-e autorizada
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/nfse/{id}/xml" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/xml", { 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/nfse/{id}/xml", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /nfse/emit
Seção intitulada “POST /nfse/emit”Emitir NFS-e a partir de OS concluída/faturada ou de venda do PDV
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
serviceOrderId |
uuid | não | ID da ordem de serviço (ou receivableId / saleId) |
saleId |
uuid | não | ID da venda do PDV com itens de serviço — vincula também a OS se a venda veio de to-sale |
receivableId |
uuid | não | ID da conta a receber vinculada à OS |
notes |
string | não | Observações internas |
tomadorKind |
string | não | PF | PJ | EXTERIOR | UNIDENTIFIED — UNIDENTIFIED omite o tomador na DPS |
dryRun |
boolean | não | true = gera DPS assinada sem enviar à Receita |
Resposta: 201 — documento fiscal (status PENDING/AUTHORIZED/DRAFT)
curl -X POST "https://api.nivesistemas.com.br/nfse/emit" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"serviceOrderId":"00000000-0000-0000-0000-000000000000","saleId":"00000000-0000-0000-0000-000000000000","receivableId":"00000000-0000-0000-0000-000000000000","notes":"","tomadorKind":"","dryRun":true}'const res = await fetch("https://api.nivesistemas.com.br/nfse/emit", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "serviceOrderId": "00000000-0000-0000-0000-000000000000", "saleId": "00000000-0000-0000-0000-000000000000", "receivableId": "00000000-0000-0000-0000-000000000000", "notes": "", "tomadorKind": "", "dryRun": true }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/emit", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "serviceOrderId": "00000000-0000-0000-0000-000000000000", "saleId": "00000000-0000-0000-0000-000000000000", "receivableId": "00000000-0000-0000-0000-000000000000", "notes": "", "tomadorKind": "", "dryRun": True },)print(res.json())Exemplo de corpo
{ "serviceOrderId": "uuid-da-os", "dryRun": false }POST /nfse/emit-direct
Seção intitulada “POST /nfse/emit-direct”Emitir NFS-e autônoma (sem OS) — ideal para outro sistema
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
tomadorKind |
string | não | PF | PJ | EXTERIOR | UNIDENTIFIED — com UNIDENTIFIED não envie tomador |
tomador |
object | não | { name, taxId, taxIdType?, email?, phone?, endereço? } — omitir se tomadorKind=UNIDENTIFIED |
servico |
object | sim | { cTribNac, descricao, cNBS?, codMunicipioPrestacao? } |
valores |
object | sim | { vServ, aliqIss?, issRetained? } |
externalReference |
string | não | Referência do sistema externo (salva em notes) |
notes |
string | não | Observações |
dryRun |
boolean | não | true = não envia à Receita |
Resposta: 201 — documento fiscal sem serviceOrderId
curl -X POST "https://api.nivesistemas.com.br/nfse/emit-direct" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"tomadorKind":"","tomador":null,"servico":null,"valores":null,"externalReference":"","notes":"","dryRun":true}'const res = await fetch("https://api.nivesistemas.com.br/nfse/emit-direct", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "tomadorKind": "", "tomador": null, "servico": null, "valores": null, "externalReference": "", "notes": "", "dryRun": true }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/emit-direct", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "tomadorKind": "", "tomador": None, "servico": None, "valores": None, "externalReference": "", "notes": "", "dryRun": True },)print(res.json())Exemplo de corpo
{ "tomador": { "name": "Cliente Externo", "taxId": "39053344705", "taxIdType": "CPF" }, "servico": { "cTribNac": "010701", "descricao": "Consultoria" }, "valores": { "vServ": 250.0, "aliqIss": 2.5 }, "externalReference": "pedido-123" }POST /nfse/emit-with-order
Seção intitulada “POST /nfse/emit-with-order”Fluxo completo: cria/localiza cliente + OS concluída + emite NFS-e
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
tomadorKind |
string | não | PF | PJ | EXTERIOR | UNIDENTIFIED — UNIDENTIFIED omite o tomador na DPS |
customer |
object | sim | { customerId } OU { name, taxId, email?, phone?, zipCode?, addressLine1?, addressNumber?, addressDistrict?, city?, state?, createIfMissing? } |
items |
array | sim | [{ variantId, quantity, unitPrice? }] — variantes de produtos tipo SERVICE |
description |
string | não | Descrição da OS |
notes |
string | não | Observações |
dryRun |
boolean | não | true = não envia à Receita |
createReceivable |
boolean | não | Gerar conta a receber (respeita config da loja) |
Resposta: 201 — { serviceOrderId, document }
curl -X POST "https://api.nivesistemas.com.br/nfse/emit-with-order" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"tomadorKind":"","customer":null,"items":[],"description":"","notes":"","dryRun":true,"createReceivable":true}'const res = await fetch("https://api.nivesistemas.com.br/nfse/emit-with-order", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "tomadorKind": "", "customer": null, "items": [], "description": "", "notes": "", "dryRun": true, "createReceivable": true }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/emit-with-order", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "tomadorKind": "", "customer": None, "items": [], "description": "", "notes": "", "dryRun": True, "createReceivable": True },)print(res.json())Exemplo de corpo
{ "customer": { "name": "Cliente API", "taxId": "39053344705" }, "items": [{ "variantId": "uuid-variante-servico", "quantity": 1, "unitPrice": 150 }] }POST /nfse/manual
Seção intitulada “POST /nfse/manual”Registrar NFS-e emitida fora do sistema
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
serviceOrderId |
uuid | não | OS vinculada (ou receivableId) |
receivableId |
uuid | não | Conta a receber vinculada |
number |
number | não | Número da nota |
series |
string | não | Série |
verificationCode |
string | não | Código de verificação |
xmlContent |
string | não | XML da nota |
pdfStorageKey |
string | não | Chave de armazenamento do PDF |
issuedAt |
string | não | Data/hora de emissão (ISO) |
notes |
string | não | Observações |
status |
string | não | MANUAL | AUTHORIZED |
curl -X POST "https://api.nivesistemas.com.br/nfse/manual" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"serviceOrderId":"00000000-0000-0000-0000-000000000000","receivableId":"00000000-0000-0000-0000-000000000000","number":0,"series":"","verificationCode":"","xmlContent":"","pdfStorageKey":"","issuedAt":"","notes":"","status":""}'const res = await fetch("https://api.nivesistemas.com.br/nfse/manual", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "serviceOrderId": "00000000-0000-0000-0000-000000000000", "receivableId": "00000000-0000-0000-0000-000000000000", "number": 0, "series": "", "verificationCode": "", "xmlContent": "", "pdfStorageKey": "", "issuedAt": "", "notes": "", "status": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/manual", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "serviceOrderId": "00000000-0000-0000-0000-000000000000", "receivableId": "00000000-0000-0000-0000-000000000000", "number": 0, "series": "", "verificationCode": "", "xmlContent": "", "pdfStorageKey": "", "issuedAt": "", "notes": "", "status": "" },)print(res.json())POST /nfse/:id/retry
Seção intitulada “POST /nfse/:id/retry”Reenviar NFS-e rejeitada/pendente (somente com OS vinculada)
Parâmetros de rota: id
curl -X POST "https://api.nivesistemas.com.br/nfse/{id}/retry" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/retry", { 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/nfse/{id}/retry", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /nfse/:id/cancel
Seção intitulada “POST /nfse/:id/cancel”Cancelar NFS-e autorizada
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
reason |
string | não | Justificativa |
reasonCode |
string | não | 1=erro emissão | 2=serviço não prestado | 9=outros |
curl -X POST "https://api.nivesistemas.com.br/nfse/{id}/cancel" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"reason":"","reasonCode":""}'const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/cancel", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "reason": "", "reasonCode": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/{id}/cancel", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "reason": "", "reasonCode": "" },)print(res.json())GET /nfse/:id/danfse
Seção intitulada “GET /nfse/:id/danfse”PDF do DANFSe (application/pdf)
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/nfse/{id}/danfse" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/danfse", { 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/nfse/{id}/danfse", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /nfse/:id/danfse-preview
Seção intitulada “GET /nfse/:id/danfse-preview”Prévia do DANFSe
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/nfse/{id}/danfse-preview" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/danfse-preview", { 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/nfse/{id}/danfse-preview", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /nfse/:id/consulta-publica
Seção intitulada “GET /nfse/:id/consulta-publica”URL oficial de consulta pública (portal nacional)
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/nfse/{id}/consulta-publica" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/consulta-publica", { 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/nfse/{id}/consulta-publica", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /nfse/:id/logs
Seção intitulada “GET /nfse/:id/logs”Histórico de eventos da NFS-e
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/nfse/{id}/logs" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/logs", { 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/nfse/{id}/logs", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /nfse/:id/consultar
Seção intitulada “POST /nfse/:id/consultar”Consultar a situação na prefeitura/portal e atualizar
Parâmetros de rota: id
curl -X POST "https://api.nivesistemas.com.br/nfse/{id}/consultar" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/consultar", { 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/nfse/{id}/consultar", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /nfse/:id/send-email
Seção intitulada “POST /nfse/:id/send-email”Enviar a NFS-e por e-mail
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
email |
string | sim |
curl -X POST "https://api.nivesistemas.com.br/nfse/{id}/send-email" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"email":""}'const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/send-email", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "email": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/{id}/send-email", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "email": "" },)print(res.json())POST /nfse/:id/substituir
Seção intitulada “POST /nfse/:id/substituir”Emitir NFS-e substituta
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
reasonCode |
string | não | 01, 02, 03, 04, 05 ou 99 |
reason |
string | não | Motivo |
tomadorKind |
string | não | Tipo de tomador |
competenceDate |
string | não | Competência |
notes |
string | não | Observações |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/nfse/{id}/substituir" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"reasonCode":"","reason":"","tomadorKind":"","competenceDate":"","notes":""}'const res = await fetch("https://api.nivesistemas.com.br/nfse/{id}/substituir", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "reasonCode": "", "reason": "", "tomadorKind": "", "competenceDate": "", "notes": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/{id}/substituir", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "reasonCode": "", "reason": "", "tomadorKind": "", "competenceDate": "", "notes": "" },)print(res.json())GET /nfse/reports/xml-zip
Seção intitulada “GET /nfse/reports/xml-zip”ZIP com os XMLs das NFS-e do período
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
from |
string | sim | Data inicial |
to |
string | sim | Data final |
curl -X GET "https://api.nivesistemas.com.br/nfse/reports/xml-zip" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/reports/xml-zip", { 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/nfse/reports/xml-zip", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /nfse/op-simp-nac
Seção intitulada “POST /nfse/op-simp-nac”Corrigir a situação da loja no Simples Nacional da NFS-e (erro E0160) e, se pedido, reenviar a nota rejeitada
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
value |
string | sim | NAO_OPTANTE | MEI | ME_EPP |
retryId |
string | não | Id da NFS-e rejeitada a reenviar logo após a correção |
Resposta: { ok: true, value, retried } (retried é a NFS-e reenviada ou null). NAO_OPTANTE também ajusta o CRT da loja para 3; os demais valores tiram o CRT 3.
curl -X POST "https://api.nivesistemas.com.br/nfse/op-simp-nac" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"value":"","retryId":""}'const res = await fetch("https://api.nivesistemas.com.br/nfse/op-simp-nac", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "value": "", "retryId": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/op-simp-nac", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "value": "", "retryId": "" },)print(res.json())GET /nfse/standalone-migration
Seção intitulada “GET /nfse/standalone-migration”Quantas NFS-e da tela antiga (sem venda/OS) ainda aguardam migração para vendas
Resposta: { pending }
curl -X GET "https://api.nivesistemas.com.br/nfse/standalone-migration" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/nfse/standalone-migration", { 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/nfse/standalone-migration", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /nfse/standalone-migration
Seção intitulada “POST /nfse/standalone-migration”Converter as NFS-e avulsas em vendas com a nota anexada
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
dryRun |
boolean | não | true só simula, sem gravar |
Resposta: { dryRun, pending, migrated, skipped, items: [{ documentId, number, status, outcome (migrated | skipped), saleId, reason }] }
curl -X POST "https://api.nivesistemas.com.br/nfse/standalone-migration" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"dryRun":true}'const res = await fetch("https://api.nivesistemas.com.br/nfse/standalone-migration", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "dryRun": true }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/nfse/standalone-migration", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "dryRun": True },)print(res.json())
