Tintométrico (fábrica de tintas)
Cores, fórmulas por base e dosagem de corantes com baixa de estoque. Disponível apenas no segmento Fábrica de tintas.
Base: https://api.nivesistemas.com.br · 21 endpoints
GET /paint/variants
Seção intitulada “GET /paint/variants”Buscar base ou corante (produto/variante)
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
q |
string | não | Mínimo 2 caracteres |
curl -X GET "https://api.nivesistemas.com.br/paint/variants" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/variants", { 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/paint/variants", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /paint/colors
Seção intitulada “GET /paint/colors”Listar cores
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
q |
string | não | Código ou nome |
active |
string | não | 1 | 0 |
page |
integer | não | Página |
curl -X GET "https://api.nivesistemas.com.br/paint/colors" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/colors", { 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/paint/colors", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /paint/colors
Seção intitulada “POST /paint/colors”Criar cor
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
code |
string | sim | Código único |
name |
string | sim | Nome |
hex |
string | não | #RRGGBB |
curl -X POST "https://api.nivesistemas.com.br/paint/colors" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"code":"","name":"Exemplo","hex":""}'const res = await fetch("https://api.nivesistemas.com.br/paint/colors", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "code": "", "name": "Exemplo", "hex": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/paint/colors", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "code": "", "name": "Exemplo", "hex": "" },)print(res.json())PATCH /paint/colors/:id
Seção intitulada “PATCH /paint/colors/:id”Editar ou inativar cor
Parâmetros de rota: id
curl -X PATCH "https://api.nivesistemas.com.br/paint/colors/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/colors/{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/paint/colors/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())DELETE /paint/colors/:id
Seção intitulada “DELETE /paint/colors/:id”Excluir cor (409 se já houve dosagem)
Parâmetros de rota: id
curl -X DELETE "https://api.nivesistemas.com.br/paint/colors/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/colors/{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/paint/colors/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /paint/colors/:id/formulas
Seção intitulada “GET /paint/colors/:id/formulas”Fórmulas da cor
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/paint/colors/{id}/formulas" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/colors/{id}/formulas", { 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/paint/colors/{id}/formulas", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /paint/colors/:id/formulas
Seção intitulada “POST /paint/colors/:id/formulas”Criar fórmula para uma base
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
baseVariantId |
uuid | sim | Base |
referenceLiters |
number | sim | Litros de base a que a fórmula se refere |
items |
array | sim | [{ colorantVariantId, quantity }] |
curl -X POST "https://api.nivesistemas.com.br/paint/colors/{id}/formulas" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"baseVariantId":"00000000-0000-0000-0000-000000000000","referenceLiters":0,"items":[]}'const res = await fetch("https://api.nivesistemas.com.br/paint/colors/{id}/formulas", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "baseVariantId": "00000000-0000-0000-0000-000000000000", "referenceLiters": 0, "items": [] }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/paint/colors/{id}/formulas", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "baseVariantId": "00000000-0000-0000-0000-000000000000", "referenceLiters": 0, "items": [] },)print(res.json())PATCH /paint/formulas/:id
Seção intitulada “PATCH /paint/formulas/:id”Editar fórmula (items substituem os atuais)
Parâmetros de rota: id
curl -X PATCH "https://api.nivesistemas.com.br/paint/formulas/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/formulas/{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/paint/formulas/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())DELETE /paint/formulas/:id
Seção intitulada “DELETE /paint/formulas/:id”Excluir fórmula
Parâmetros de rota: id
curl -X DELETE "https://api.nivesistemas.com.br/paint/formulas/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/formulas/{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/paint/formulas/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /paint/formulas/:id/duplicate
Seção intitulada “POST /paint/formulas/:id/duplicate”Copiar fórmula para outra base
Parâmetros de rota: id
curl -X POST "https://api.nivesistemas.com.br/paint/formulas/{id}/duplicate" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/formulas/{id}/duplicate", { 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/paint/formulas/{id}/duplicate", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /paint/formulas/:id/preview
Seção intitulada “GET /paint/formulas/:id/preview”Corantes escalados para a litragem, saldo e custo
Parâmetros de rota: id
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
liters |
number | sim | Litros |
curl -X GET "https://api.nivesistemas.com.br/paint/formulas/{id}/preview" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/formulas/{id}/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/paint/formulas/{id}/preview", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /paint/jobs
Seção intitulada “POST /paint/jobs”Dosar: baixa os corantes e registra a dosagem
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
colorId |
uuid | sim | Cor |
baseVariantId |
uuid | sim | Base |
liters |
number | sim | Litros |
saleId |
uuid | não | Venda relacionada |
allowNegativeStock |
boolean | não | Permitir estoque negativo |
consumeBaseQty |
number | não | Baixar também a base |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/paint/jobs" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"colorId":"00000000-0000-0000-0000-000000000000","baseVariantId":"00000000-0000-0000-0000-000000000000","liters":0,"saleId":"00000000-0000-0000-0000-000000000000","allowNegativeStock":true,"consumeBaseQty":0}'const res = await fetch("https://api.nivesistemas.com.br/paint/jobs", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "colorId": "00000000-0000-0000-0000-000000000000", "baseVariantId": "00000000-0000-0000-0000-000000000000", "liters": 0, "saleId": "00000000-0000-0000-0000-000000000000", "allowNegativeStock": true, "consumeBaseQty": 0 }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/paint/jobs", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "colorId": "00000000-0000-0000-0000-000000000000", "baseVariantId": "00000000-0000-0000-0000-000000000000", "liters": 0, "saleId": "00000000-0000-0000-0000-000000000000", "allowNegativeStock": True, "consumeBaseQty": 0 },)print(res.json())GET /paint/jobs
Seção intitulada “GET /paint/jobs”Histórico de dosagens
curl -X GET "https://api.nivesistemas.com.br/paint/jobs" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/jobs", { 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/paint/jobs", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /paint/jobs/:id
Seção intitulada “GET /paint/jobs/:id”Detalhe da dosagem
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/paint/jobs/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/jobs/{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/paint/jobs/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /paint/jobs/:id/label
Seção intitulada “GET /paint/jobs/:id/label”Dados da etiqueta da lata
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/paint/jobs/{id}/label" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/jobs/{id}/label", { 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/paint/jobs/{id}/label", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /paint/import
Seção intitulada “POST /paint/import”Importar cores e fórmulas (CSV)
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
csv |
string | sim | codigo;nome;hex;base_gtin;litros_ref;corante_gtin;quantidade |
curl -X POST "https://api.nivesistemas.com.br/paint/import" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"csv":""}'const res = await fetch("https://api.nivesistemas.com.br/paint/import", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "csv": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/paint/import", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "csv": "" },)print(res.json())GET /paint/colors/:id/compare
Seção intitulada “GET /paint/colors/:id/compare”Comparar a mesma cor entre as bases: corante por litro de base e diferença percentual entre bases
Parâmetros de rota: id
Resposta: { color: { id, code, name, hex }, … } com uma linha por fórmula/base. 404 se a cor não existe.
curl -X GET "https://api.nivesistemas.com.br/paint/colors/{id}/compare" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/colors/{id}/compare", { 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/paint/colors/{id}/compare", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /paint/formulas/:id/versions
Seção intitulada “GET /paint/formulas/:id/versions”Histórico de versões da fórmula (mais nova primeiro, até 200), com os corantes de cada versão
Parâmetros de rota: id
Resposta: { formulaId, currentVersion, versions: [{ version, reason, createdById, createdAt, referenceLiters, items: [{ colorantVariantId, quantity, description, label, unit }] }] }
curl -X GET "https://api.nivesistemas.com.br/paint/formulas/{id}/versions" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/formulas/{id}/versions", { 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/paint/formulas/{id}/versions", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /paint/formulas/preview
Seção intitulada “GET /paint/formulas/preview”Prévia da dosagem para cor + base (sem precisar do id da fórmula): corantes escalados, saldo e custo
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
colorId |
uuid | sim | Cor (informar junto com baseVariantId) |
baseVariantId |
uuid | sim | Base (informar junto com colorId) |
liters |
number | não | Litros (informe liters ou packages) |
packages |
string | não | Embalagens “tamanho x quantidade” separadas por vírgula, ex.: 3.6x2,18x1 |
Resposta: 400 se faltar colorId/baseVariantId juntos ou a litragem/embalagens. Usa o ajuste de doses por mL da loja, quando configurado.
curl -X GET "https://api.nivesistemas.com.br/paint/formulas/preview" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/formulas/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/paint/formulas/preview", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /paint/jobs/:id/cancel
Seção intitulada “POST /paint/jobs/:id/cancel”Cancelar dosagem: devolve corantes (e a base, se a dosagem a baixou) ao estoque, nos mesmos lotes consumidos
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
reason |
string | sim | Motivo (3 a 300 caracteres) |
Resposta: A dosagem cancelada. Idempotente: repetir devolve o cancelamento original (com idempotent: true), sem novo movimento de estoque. 409 se a dosagem está ligada a uma venda (cancele ou estorne a venda).
curl -X POST "https://api.nivesistemas.com.br/paint/jobs/{id}/cancel" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"reason":""}'const res = await fetch("https://api.nivesistemas.com.br/paint/jobs/{id}/cancel", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "reason": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/paint/jobs/{id}/cancel", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "reason": "" },)print(res.json())POST /paint/jobs/:id/label/reprint
Seção intitulada “POST /paint/jobs/:id/label/reprint”Reimprimir a etiqueta da lata: devolve os dados da etiqueta e conta a reimpressão
Parâmetros de rota: id
Resposta: Dados da etiqueta, com labelPrintCount (nº da impressão). 409 se a dosagem foi cancelada; 404 se não existe.
curl -X POST "https://api.nivesistemas.com.br/paint/jobs/{id}/label/reprint" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/paint/jobs/{id}/label/reprint", { 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/paint/jobs/{id}/label/reprint", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
