Contratos de serviço
Base: https://api.nivesistemas.com.br · 5 endpoints
GET /service-contracts
Seção intitulada “GET /service-contracts”Listar contrato de serviço
curl -X GET "https://api.nivesistemas.com.br/service-contracts" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/service-contracts", { 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/service-contracts", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /service-contracts
Seção intitulada “POST /service-contracts”Criar contrato de serviço
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
customerId |
uuid | sim | Cliente |
title |
string | sim | Título |
contractType |
string | não | Tipo |
value |
number | não | Valor |
period |
string | não | Periodicidade de faturamento |
startsAt |
string | sim | Início da vigência |
endsAt |
string | não | Fim da vigência |
autoRenew |
boolean | não | Renovação automática |
status |
string | não | Status |
notes |
string | não | Observações |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/service-contracts" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"customerId":"00000000-0000-0000-0000-000000000000","title":"","contractType":"","value":0,"period":"","startsAt":"","endsAt":"","autoRenew":true,"status":"","notes":""}'const res = await fetch("https://api.nivesistemas.com.br/service-contracts", { method: "POST", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "customerId": "00000000-0000-0000-0000-000000000000", "title": "", "contractType": "", "value": 0, "period": "", "startsAt": "", "endsAt": "", "autoRenew": true, "status": "", "notes": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/service-contracts", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "customerId": "00000000-0000-0000-0000-000000000000", "title": "", "contractType": "", "value": 0, "period": "", "startsAt": "", "endsAt": "", "autoRenew": True, "status": "", "notes": "" },)print(res.json())PATCH /service-contracts/:id
Seção intitulada “PATCH /service-contracts/:id”Atualizar contrato de serviço
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
customerId |
uuid | sim | Cliente |
title |
string | sim | Título |
contractType |
string | não | Tipo |
value |
number | não | Valor |
period |
string | não | Periodicidade de faturamento |
startsAt |
string | sim | Início da vigência |
endsAt |
string | não | Fim da vigência |
autoRenew |
boolean | não | Renovação automática |
status |
string | não | Status |
notes |
string | não | Observações |
curl -X PATCH "https://api.nivesistemas.com.br/service-contracts/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo" \ -H "Content-Type: application/json" \ -d '{"customerId":"00000000-0000-0000-0000-000000000000","title":"","contractType":"","value":0,"period":"","startsAt":"","endsAt":"","autoRenew":true,"status":"","notes":""}'const res = await fetch("https://api.nivesistemas.com.br/service-contracts/{id}", { method: "PATCH", headers: { Authorization: "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", "Content-Type": "application/json", }, body: JSON.stringify({ "customerId": "00000000-0000-0000-0000-000000000000", "title": "", "contractType": "", "value": 0, "period": "", "startsAt": "", "endsAt": "", "autoRenew": true, "status": "", "notes": "" }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/service-contracts/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "customerId": "00000000-0000-0000-0000-000000000000", "title": "", "contractType": "", "value": 0, "period": "", "startsAt": "", "endsAt": "", "autoRenew": True, "status": "", "notes": "" },)print(res.json())DELETE /service-contracts/:id
Seção intitulada “DELETE /service-contracts/:id”Excluir contrato de serviço
Parâmetros de rota: id
Resposta: 204 No Content
curl -X DELETE "https://api.nivesistemas.com.br/service-contracts/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/service-contracts/{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/service-contracts/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /service-contracts/:id
Seção intitulada “GET /service-contracts/:id”Detalhe do contrato
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/service-contracts/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/service-contracts/{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/service-contracts/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
