Clientes
Base: https://api.nivesistemas.com.br · 13 endpoints
GET /customers
Seção intitulada “GET /customers”Listar clientes
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
q |
string | não | Busca por nome, CPF/CNPJ, e-mail |
page |
number | não | Página (ativa paginação) |
pageSize |
number | não | Itens por página (padrão 20) |
sortBy |
string | não | Coluna: name | taxId | phone | email |
sortDir |
string | não | asc | desc |
curl -X GET "https://api.nivesistemas.com.br/customers" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/customers", { 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/customers", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /customers
Seção intitulada “POST /customers”Criar cliente
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name |
string | sim | Nome (como no RG/CNH) |
nickname |
string | não | Apelido (opcional) |
cpf |
string | não | CPF (legado) |
taxId |
string | não | CPF ou CNPJ (somente dígitos) |
taxIdType |
string | não | CPF | CNPJ |
email |
string | não | |
phone |
string | não | Telefone |
birthDate |
string | não | Data nascimento (YYYY-MM-DD) |
gender |
string | não | FEMALE | MALE | OTHER |
zipCode |
string | não | CEP |
addressLine1 |
string | não | Endereço |
addressNumber |
string | não | Número |
addressLine2 |
string | não | Complemento |
addressDistrict |
string | não | Bairro |
city |
string | não | Cidade |
state |
string | não | UF |
notes |
string | não | Observações |
creditLimit |
number | não | Limite de crédito (padrão 0) |
priceListId |
uuid | não | Tabela de preços |
excludeFromCommission |
boolean | não | Excluir de comissão |
birthdayGreetingEnabled |
boolean | não | Receber saudação de aniversário (padrão true) |
preferredGoodsDocumentType |
string | não | NFCE_65 | NFE_55 | null — modelo fiscal de mercadoria nas vendas deste cliente |
socialLinks |
array | não | [{ network: ‘INSTAGRAM’, handle, label? }] |
curl -X POST "https://api.nivesistemas.com.br/customers" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"name":"Exemplo","nickname":"","cpf":"","taxId":"","taxIdType":"","email":"","phone":"","birthDate":"","gender":"","zipCode":"","addressLine1":"","addressNumber":"","addressLine2":"","addressDistrict":"","city":"","state":"","notes":"","creditLimit":0,"priceListId":"00000000-0000-0000-0000-000000000000","excludeFromCommission":true,"birthdayGreetingEnabled":true,"preferredGoodsDocumentType":"","socialLinks":[]}'const res = await fetch("https://api.nivesistemas.com.br/customers", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Exemplo", "nickname": "", "cpf": "", "taxId": "", "taxIdType": "", "email": "", "phone": "", "birthDate": "", "gender": "", "zipCode": "", "addressLine1": "", "addressNumber": "", "addressLine2": "", "addressDistrict": "", "city": "", "state": "", "notes": "", "creditLimit": 0, "priceListId": "00000000-0000-0000-0000-000000000000", "excludeFromCommission": true, "birthdayGreetingEnabled": true, "preferredGoodsDocumentType": "", "socialLinks": [] }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/customers", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "name": "Exemplo", "nickname": "", "cpf": "", "taxId": "", "taxIdType": "", "email": "", "phone": "", "birthDate": "", "gender": "", "zipCode": "", "addressLine1": "", "addressNumber": "", "addressLine2": "", "addressDistrict": "", "city": "", "state": "", "notes": "", "creditLimit": 0, "priceListId": "00000000-0000-0000-0000-000000000000", "excludeFromCommission": True, "birthdayGreetingEnabled": True, "preferredGoodsDocumentType": "", "socialLinks": [] },)print(res.json())PATCH /customers/:id
Seção intitulada “PATCH /customers/:id”Atualizar cliente
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name |
string | não | Nome e demais campos do POST |
curl -X PATCH "https://api.nivesistemas.com.br/customers/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"name":"Exemplo"}'const res = await fetch("https://api.nivesistemas.com.br/customers/{id}", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Exemplo" }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/customers/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "name": "Exemplo" },)print(res.json())PATCH /customers/:id/contact
Seção intitulada “PATCH /customers/:id/contact”Completar contato do cliente (só os campos enviados)
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
phone |
string | não | Telefone com DDD |
email |
string | não | |
taxId |
string | não | CPF ou CNPJ |
curl -X PATCH "https://api.nivesistemas.com.br/customers/{id}/contact" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"phone":"","email":"","taxId":""}'const res = await fetch("https://api.nivesistemas.com.br/customers/{id}/contact", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "phone": "", "email": "", "taxId": "" }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/customers/{id}/contact", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "phone": "", "email": "", "taxId": "" },)print(res.json())DELETE /customers/:id
Seção intitulada “DELETE /customers/:id”Excluir cliente
Parâmetros de rota: id
Resposta: 204 No Content
curl -X DELETE "https://api.nivesistemas.com.br/customers/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/customers/{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/customers/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /customers/:id
Seção intitulada “GET /customers/:id”Detalhe do cliente
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/customers/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/customers/{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/customers/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /customers/:id/merge-preview
Seção intitulada “GET /customers/:id/merge-preview”Prévia da mesclagem de clientes
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/customers/{id}/merge-preview" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/customers/{id}/merge-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/customers/{id}/merge-preview", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /customers/merge
Seção intitulada “POST /customers/merge”Mesclar dois clientes (mantém keepId, absorve mergeId)
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
keepId |
uuid | sim | Cliente que permanece |
mergeId |
uuid | sim | Cliente absorvido |
curl -X POST "https://api.nivesistemas.com.br/customers/merge" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"keepId":"00000000-0000-0000-0000-000000000000","mergeId":"00000000-0000-0000-0000-000000000000"}'const res = await fetch("https://api.nivesistemas.com.br/customers/merge", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "keepId": "00000000-0000-0000-0000-000000000000", "mergeId": "00000000-0000-0000-0000-000000000000" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/customers/merge", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "keepId": "00000000-0000-0000-0000-000000000000", "mergeId": "00000000-0000-0000-0000-000000000000" },)print(res.json())PATCH /customers/bulk/values
Seção intitulada “PATCH /customers/bulk/values”Atualizar um campo com valores distintos por cliente
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
field |
string | sim | Campo da grade |
updates |
array | sim | [{ id, value }] |
curl -X PATCH "https://api.nivesistemas.com.br/customers/bulk/values" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"field":"","updates":[]}'const res = await fetch("https://api.nivesistemas.com.br/customers/bulk/values", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "field": "", "updates": [] }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/customers/bulk/values", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "field": "", "updates": [] },)print(res.json())PATCH /customers/bulk/field
Seção intitulada “PATCH /customers/bulk/field”Atualizar o mesmo valor de um campo em vários clientes
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
ids |
uuid[] | sim | IDs dos clientes |
field |
string | sim | Campo a atualizar |
value |
string | não | Novo valor |
curl -X PATCH "https://api.nivesistemas.com.br/customers/bulk/field" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"ids":null,"field":"","value":""}'const res = await fetch("https://api.nivesistemas.com.br/customers/bulk/field", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "ids": null, "field": "", "value": "" }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/customers/bulk/field", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "ids": None, "field": "", "value": "" },)print(res.json())GET /customers/bulk/name-format/jobs
Seção intitulada “GET /customers/bulk/name-format/jobs”Listar jobs de correção de nomes
curl -X GET "https://api.nivesistemas.com.br/customers/bulk/name-format/jobs" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/customers/bulk/name-format/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/customers/bulk/name-format/jobs", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())DELETE /customers/bulk/name-format/jobs/:jobId
Seção intitulada “DELETE /customers/bulk/name-format/jobs/:jobId”Cancelar correção de nomes em andamento
Parâmetros de rota: jobId
curl -X DELETE "https://api.nivesistemas.com.br/customers/bulk/name-format/jobs/{jobId}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/customers/bulk/name-format/jobs/{jobId}", { 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/customers/bulk/name-format/jobs/{jobId}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /customers/bulk/name-format
Seção intitulada “POST /customers/bulk/name-format”Enfileirar correção dos nomes existentes com a formatação configurada
curl -X POST "https://api.nivesistemas.com.br/customers/bulk/name-format" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/customers/bulk/name-format", { 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/customers/bulk/name-format", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
