Embalagem para presente
Modelos de embalagem cobrados no PDV e as regras do recurso. O lançamento na venda fica em /sales/:id/gift-wraps. Os cadastros exigem a permissão de gerenciar catálogo.
Base: https://api.nivesistemas.com.br · 5 endpoints
GET /gift-wraps
Seção intitulada “GET /gift-wraps”Listar modelos de embalagem e as configurações do recurso
Resposta: { enabled, allowCustomValue, items }. Cada item: id, name, description, code, value, active e position.
curl -X GET "https://api.nivesistemas.com.br/gift-wraps" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/gift-wraps", { 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/gift-wraps", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())PUT /gift-wraps/settings
Seção intitulada “PUT /gift-wraps/settings”Ligar o recurso e permitir valor livre no PDV
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
enabled |
boolean | não | Embalagem para presente habilitada na loja |
allowCustomValue |
boolean | não | Permite informar valor/nome livres no PDV (ainda exige a permissão sales.gift_wrap_custom_price do usuário) |
Resposta: Retorna o mesmo payload de GET /gift-wraps.
curl -X PUT "https://api.nivesistemas.com.br/gift-wraps/settings" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"enabled":true,"allowCustomValue":true}'const res = await fetch("https://api.nivesistemas.com.br/gift-wraps/settings", { method: "PUT", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "enabled": true, "allowCustomValue": true }),});const data = await res.json();import requests
res = requests.request( "PUT", "https://api.nivesistemas.com.br/gift-wraps/settings", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "enabled": True, "allowCustomValue": True },)print(res.json())POST /gift-wraps
Seção intitulada “POST /gift-wraps”Criar modelo de embalagem
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name |
string | sim | Nome (até 80) |
value |
number | sim | Valor cobrado por embalagem (0 a 100000) |
description |
string | não | Descrição (até 200) |
code |
string | não | Código interno (até 30) |
active |
boolean | não | Ativo (padrão true) |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/gift-wraps" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"name":"Exemplo","value":0,"description":"","code":"","active":true}'const res = await fetch("https://api.nivesistemas.com.br/gift-wraps", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Exemplo", "value": 0, "description": "", "code": "", "active": true }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/gift-wraps", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "name": "Exemplo", "value": 0, "description": "", "code": "", "active": True },)print(res.json())PATCH /gift-wraps/:id
Seção intitulada “PATCH /gift-wraps/:id”Atualizar modelo de embalagem (campos parciais)
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
name |
string | não | Nome (até 80) |
value |
number | não | Valor cobrado |
description |
string | não | Descrição (até 200) |
code |
string | não | Código interno (até 30) |
active |
boolean | não | Ativo |
Resposta: 404 se o modelo não existe.
curl -X PATCH "https://api.nivesistemas.com.br/gift-wraps/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"name":"Exemplo","value":0,"description":"","code":"","active":true}'const res = await fetch("https://api.nivesistemas.com.br/gift-wraps/{id}", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Exemplo", "value": 0, "description": "", "code": "", "active": true }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/gift-wraps/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "name": "Exemplo", "value": 0, "description": "", "code": "", "active": True },)print(res.json())DELETE /gift-wraps/:id
Seção intitulada “DELETE /gift-wraps/:id”Excluir modelo de embalagem
Parâmetros de rota: id
Resposta: 204 No Content. 404 se o modelo não existe.
curl -X DELETE "https://api.nivesistemas.com.br/gift-wraps/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/gift-wraps/{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/gift-wraps/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
