Recorrência de serviços
Base: https://api.nivesistemas.com.br · 6 endpoints
GET /service-recurrence
Seção intitulada “GET /service-recurrence”Listar regra de recorrência
curl -X GET "https://api.nivesistemas.com.br/service-recurrence" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/service-recurrence", { 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-recurrence", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /service-recurrence
Seção intitulada “POST /service-recurrence”Criar regra de recorrência
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
customerId |
uuid | sim | Cliente |
title |
string | sim | Título |
nextRunAt |
string | sim | Próxima execução |
period |
string | não | Periodicidade |
contractId |
uuid | não | Contrato |
subscriptionId |
uuid | não | Assinatura |
assetId |
uuid | não | Ativo |
checklistTemplateId |
uuid | não | Checklist |
technicianId |
uuid | não | Técnico |
status |
string | não | Status |
Resposta: 201 Created
curl -X POST "https://api.nivesistemas.com.br/service-recurrence" \ -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":"","nextRunAt":"","period":"","contractId":"00000000-0000-0000-0000-000000000000","subscriptionId":"00000000-0000-0000-0000-000000000000","assetId":"00000000-0000-0000-0000-000000000000","checklistTemplateId":"00000000-0000-0000-0000-000000000000","technicianId":"00000000-0000-0000-0000-000000000000","status":""}'const res = await fetch("https://api.nivesistemas.com.br/service-recurrence", { 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": "", "nextRunAt": "", "period": "", "contractId": "00000000-0000-0000-0000-000000000000", "subscriptionId": "00000000-0000-0000-0000-000000000000", "assetId": "00000000-0000-0000-0000-000000000000", "checklistTemplateId": "00000000-0000-0000-0000-000000000000", "technicianId": "00000000-0000-0000-0000-000000000000", "status": "" }),});const data = await res.json();import requests
res = requests.request( "POST", "https://api.nivesistemas.com.br/service-recurrence", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "customerId": "00000000-0000-0000-0000-000000000000", "title": "", "nextRunAt": "", "period": "", "contractId": "00000000-0000-0000-0000-000000000000", "subscriptionId": "00000000-0000-0000-0000-000000000000", "assetId": "00000000-0000-0000-0000-000000000000", "checklistTemplateId": "00000000-0000-0000-0000-000000000000", "technicianId": "00000000-0000-0000-0000-000000000000", "status": "" },)print(res.json())PATCH /service-recurrence/:id
Seção intitulada “PATCH /service-recurrence/:id”Atualizar regra de recorrência
Parâmetros de rota: id
Corpo (JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
customerId |
uuid | sim | Cliente |
title |
string | sim | Título |
nextRunAt |
string | sim | Próxima execução |
period |
string | não | Periodicidade |
contractId |
uuid | não | Contrato |
subscriptionId |
uuid | não | Assinatura |
assetId |
uuid | não | Ativo |
checklistTemplateId |
uuid | não | Checklist |
technicianId |
uuid | não | Técnico |
status |
string | não | Status |
curl -X PATCH "https://api.nivesistemas.com.br/service-recurrence/{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":"","nextRunAt":"","period":"","contractId":"00000000-0000-0000-0000-000000000000","subscriptionId":"00000000-0000-0000-0000-000000000000","assetId":"00000000-0000-0000-0000-000000000000","checklistTemplateId":"00000000-0000-0000-0000-000000000000","technicianId":"00000000-0000-0000-0000-000000000000","status":""}'const res = await fetch("https://api.nivesistemas.com.br/service-recurrence/{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": "", "nextRunAt": "", "period": "", "contractId": "00000000-0000-0000-0000-000000000000", "subscriptionId": "00000000-0000-0000-0000-000000000000", "assetId": "00000000-0000-0000-0000-000000000000", "checklistTemplateId": "00000000-0000-0000-0000-000000000000", "technicianId": "00000000-0000-0000-0000-000000000000", "status": "" }),});const data = await res.json();import requests
res = requests.request( "PATCH", "https://api.nivesistemas.com.br/service-recurrence/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", }, json={ "customerId": "00000000-0000-0000-0000-000000000000", "title": "", "nextRunAt": "", "period": "", "contractId": "00000000-0000-0000-0000-000000000000", "subscriptionId": "00000000-0000-0000-0000-000000000000", "assetId": "00000000-0000-0000-0000-000000000000", "checklistTemplateId": "00000000-0000-0000-0000-000000000000", "technicianId": "00000000-0000-0000-0000-000000000000", "status": "" },)print(res.json())DELETE /service-recurrence/:id
Seção intitulada “DELETE /service-recurrence/:id”Excluir regra de recorrência
Parâmetros de rota: id
Resposta: 204 No Content
curl -X DELETE "https://api.nivesistemas.com.br/service-recurrence/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/service-recurrence/{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-recurrence/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())GET /service-recurrence/:id
Seção intitulada “GET /service-recurrence/:id”Detalhe da regra
Parâmetros de rota: id
curl -X GET "https://api.nivesistemas.com.br/service-recurrence/{id}" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/service-recurrence/{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-recurrence/{id}", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())POST /service-recurrence/run-due
Seção intitulada “POST /service-recurrence/run-due”Executar regras vencidas agora
curl -X POST "https://api.nivesistemas.com.br/service-recurrence/run-due" \ -H "Authorization: Bearer sl_live_exemplo_abc123xyz789" \ -H "X-Store-Slug: loja-demo"const res = await fetch("https://api.nivesistemas.com.br/service-recurrence/run-due", { 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/service-recurrence/run-due", headers={ "Authorization": "Bearer sl_live_exemplo_abc123xyz789", "X-Store-Slug": "loja-demo", },)print(res.json())
