Canais de venda
Origem da venda (loja física, WhatsApp, Instagram, marketplace…), usada em relatórios.
Base: https://api.nivesistemas.com.br · 4 endpoints
GET /sales-channels
Seção intitulada “GET /sales-channels”Listar canais
Query params
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
active |
boolean | não | Somente ativos (true/1) |
curl -X GET "https://api.nivesistemas.com.br/sales-channels" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/sales-channels", { 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/sales-channels", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /sales-channels
Seção intitulada “POST /sales-channels”Criar canal
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name |
string | sim | Nome |
active |
boolean | não | Padrão true |
position |
integer | não | Ordem de exibição |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/sales-channels" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"name":"Exemplo","active":true,"position":1}'const res = await fetch("https://api.nivesistemas.com.br/sales-channels", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Exemplo", "active": true, "position": 1 }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/sales-channels", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "name": "Exemplo", "active": True, "position": 1 },)print(res.json())PATCH /sales-channels/:id
Seção intitulada “PATCH /sales-channels/:id”Atualizar canal (campos parciais)
Parâmetros de rota: id
curl -X PATCH "https://api.nivesistemas.com.br/sales-channels/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/sales-channels/{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/sales-channels/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())DELETE /sales-channels/:id
Seção intitulada “DELETE /sales-channels/:id”Excluir canal
Parâmetros de rota: id
Resposta: 204 No Content
curl -X DELETE "https://api.nivesistemas.com.br/sales-channels/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/sales-channels/{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/sales-channels/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
