{
  "info": {
    "name": "ConsensoSicuro · API del tuo account",
    "description": "Una richiesta per ogni endpoint di /api/v1/account. Imposta la variabile apiKey con una chiave ak_test_ per provare senza toccare i dati veri. Riferimento completo: https://consensosicuro.it/integrazioni/api",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.consensosicuro.it/api/v1/account",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "ak_test_…",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Account",
      "description": "Chi è l'account della chiave, il profilo e il Registro attività.",
      "item": [
        {
          "name": "Chi è l'account della chiave",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "me"
              ]
            },
            "description": "Restituisce il profilo dell'account, il piano, la quota dei consensi, le sedi e i professionisti. È la prima chiamata utile per verificare che la chiave funzioni.\n\nPermesso: account:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-me"
          },
          "response": []
        },
        {
          "name": "Leggi il profilo",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/account/profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "account",
                "profile"
              ]
            },
            "description": "Restituisce il profilo dell'account: identità, contatti, intestazione dei documenti, aspetto e dati di fatturazione, questi ultimi in sola lettura.\n\nPermesso: account:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-account-profile"
          },
          "response": []
        },
        {
          "name": "Aggiorna il profilo",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/account/profile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "account",
                "profile"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"professionTitle\": \"Psicologa clinica\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cambia solo i campi che il profilo della dashboard lascia cambiare da soli e che non toccano accesso, fatturazione o funzioni. Email di accesso, password, telefono (è un fattore di verifica), nome, dati fiscali ed etichetta della struttura si cambiano dalla dashboard. Per una struttura ragione sociale e indirizzo sono anche i dati di fatturazione, quindi via API restano in lettura. Dopo la modifica parte l'evento `configuration.updated`.\n\nPermesso: account:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-account-profile"
          },
          "response": []
        },
        {
          "name": "Registro attività",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/account/audit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "account",
                "audit"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Pagina, da 1.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Righe per pagina, da 1 a 100 (predefinito 25).",
                  "disabled": true
                },
                {
                  "key": "action",
                  "value": "CONSENT_SENT",
                  "description": "Nome di un'azione, per esempio CONSENT_SENT o ANAMNESIS_VIEWED.",
                  "disabled": true
                },
                {
                  "key": "performedBy",
                  "value": "PROFESSIONAL",
                  "description": "Chi ha compiuto l'azione.",
                  "disabled": true
                },
                {
                  "key": "sedeId",
                  "value": "",
                  "description": "Strutture: solo le voci riferite ai pazienti di quella sede.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "2026-09-01",
                  "description": "Inizio del periodo: una data (AAAA-MM-GG) o un istante ISO 8601.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30",
                  "description": "Fine del periodo, compresa: una data (AAAA-MM-GG) o un istante ISO 8601.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce il Registro attività della dashboard, pagina per pagina: azione, paziente, chi, IP, dettagli e istante, più `patientId` e `via` (dashboard o API). Con `account:read` gli indirizzi IP arrivano con l'ultima parte nascosta (203.0.113.xxx); con il permesso `audit:read` arrivano completi.\n\nPermesso: account:read (oppure audit:read) (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-account-audit"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Catalogo",
      "description": "I codici dei trattamenti, i modelli, le lingue, le sedi e gli esecutori da usare nell'invio.",
      "item": [
        {
          "name": "Catalogo dell'account",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "templates"
              ]
            },
            "description": "Restituisce il catalogo del tuo account: codici dei trattamenti per ambito, schede con i tuoi testi, modelli salvati, moduli Agorà, lingue attive, sedi ed esecutori, operatrici e apparecchiature. È la lettura che precede ogni invio.\n\nPermesso: templates:read (oppure account:read)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-templates"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Consensi",
      "description": "Invio, elenco, dettaglio, consegna, evidenza della firma e annullamento.",
      "item": [
        {
          "name": "Elenco dei consensi",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "COMPLETED",
                  "description": "Uno stato del vocabolario dell'API (PENDING_SIGNATURE, PARTIALLY_SIGNED, ACTION_REQUIRED, COMPLETED, REFUSED, EXPIRED, CANCELLED) oppure uno stato interno, per la granularità piena.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "2026-09-01T00:00:00Z",
                  "description": "Creati da questo istante (ISO 8601 con ora).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30T23:59:59Z",
                  "description": "Creati fino a questo istante (ISO 8601 con ora).",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "description": "Nome, cognome o telefono del paziente.",
                  "disabled": true
                },
                {
                  "key": "sedeId",
                  "value": "",
                  "description": "Sede della struttura (in alternativa all'intestazione X-Structure-Sede-Id).",
                  "disabled": true
                },
                {
                  "key": "executorMemberId",
                  "value": "",
                  "description": "Professionista esecutore.",
                  "disabled": true
                },
                {
                  "key": "patientExternalId",
                  "value": "CRM-4412",
                  "description": "Il tuo riferimento passato all'invio (`patient.externalId`).",
                  "disabled": true
                },
                {
                  "key": "expiringWithinHours",
                  "value": "48",
                  "description": "Solo i consensi ancora in attesa il cui link scade entro N ore (da 1 a 2160).",
                  "disabled": true
                },
                {
                  "key": "signingMode",
                  "value": "REMOTE",
                  "description": "REMOTE (telefono del paziente) o IN_STUDIO (tablet della sede).",
                  "disabled": true
                },
                {
                  "key": "apiTest",
                  "value": "true",
                  "description": "`true` = solo i consensi di prova, `false` = solo quelli veri.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Da 1 a 100 (predefinito 25).",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "Cursore della pagina successiva (campo `nextCursor`). Un cursore non riconosciuto è un errore (400 INVALID_CURSOR), non un ritorno silenzioso alla prima pagina.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce i consensi dal più recente, con filtri per stato, periodo, paziente, sede ed esecutore.\n\nPermesso: consents:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents"
          },
          "response": []
        },
        {
          "name": "Invia un consenso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"patient\": {\n    \"firstName\": \"Mario\",\n    \"lastName\": \"Rossi\",\n    \"phone\": \"+393331234567\"\n  },\n  \"template\": {\n    \"treatments\": [\n      \"psi-colloquio\"\n    ]\n  },\n  \"delivery\": {\n    \"channel\": \"WHATSAPP\",\n    \"language\": \"it\"\n  },\n  \"metadata\": {\n    \"cartella\": \"CRT-119\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Invia un consenso al paziente con le stesse opzioni della dashboard. Consuma la quota del piano come un invio fatto a mano; con una chiave in modalità Test il consenso si crea ma non parte nessun messaggio. La risposta 201 ha la stessa forma di `GET /consents/{id}`.\n\nPermesso: consents:create\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents"
          },
          "response": []
        },
        {
          "name": "Dettaglio di un consenso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce il dettaglio completo del consenso: firmatari (uno per link), difformità sui dati del minore, esiti di consegna, evidenza dell'OTP, incarico, anamnesi in forma di semaforo, registro dei lotti, controfirma, documenti disponibili e cronologia.\n\nPermesso: consents:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id"
          },
          "response": []
        },
        {
          "name": "Esiti di consegna",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/delivery",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "delivery"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce gli esiti di consegna per firmatario: ogni tentativo su WhatsApp e per SMS, ripieghi automatici compresi, con esito e motivo. È la lettura che dice se serve correggere un numero.\n\nPermesso: consents:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-delivery"
          },
          "response": []
        },
        {
          "name": "Evidenza della firma",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/evidence",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "evidence"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce le prove della firma per ogni firmatario: canale e numero mascherato dell'OTP, ora di invio e di verifica, IP e dispositivo di chi ha firmato, codici di controllo SHA-256 dei documenti. Con la doppia firma c'è una voce per genitore.\n\nPermesso: consents:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-evidence"
          },
          "response": []
        },
        {
          "name": "Registro del consenso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/audit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "audit"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce il registro del consenso: cosa è successo, quando e per opera di chi (dashboard o integrazione), con l'anello della catena hash di ogni riga. Numeri di telefono, email e risposte cliniche restano fuori.\n\nPermesso: consents:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-audit"
          },
          "response": []
        },
        {
          "name": "Annulla un consenso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Annulla un consenso non ancora firmato, con le stesse regole della dashboard. Un consenso vero torna nella quota del piano; uno di prova non l'aveva consumata. Parte l'evento `consent.cancelled`.\n\nPermesso: consents:cancel\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-cancel"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Ciclo di vita",
      "description": "Reinvio, rinnovo, cambio canale, correzione del numero, difformità e controfirma.",
      "item": [
        {
          "name": "Reinvia un consenso scaduto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/resend",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "resend"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Reinvia un consenso scaduto. Nasce un consenso nuovo, con un link nuovo, e consuma un'unità di quota come un invio fatto a mano. La risposta è il dettaglio del consenso nuovo, con `replacesConsentId` che punta a quello sostituito.\n\nPermesso: consents:create\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-resend"
          },
          "response": []
        },
        {
          "name": "Rinnova un consenso a scadenza",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/renew",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "renew"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Rinnova un consenso firmato con validità a termine, cioè creato da un modello con scadenza. Funziona come il reinvio: nasce un consenso nuovo e l'originale viene segnato come rinnovato.\n\nPermesso: consents:create\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-renew"
          },
          "response": []
        },
        {
          "name": "Sposta un firmatario su SMS",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/channel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "channel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"channel\": \"SMS\",\n  \"slot\": \"P2\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sposta su SMS il link di un firmatario quando la consegna su WhatsApp non è riuscita. Il link resta lo stesso e la quota non si consuma. È il «Reinvia via SMS» della dashboard e va in una sola direzione, da WhatsApp a SMS.\n\nPermesso: consents:create\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-channel"
          },
          "response": []
        },
        {
          "name": "Correggi il numero di un firmatario",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/correct-phone",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "correct-phone"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"+393334445566\",\n  \"slot\": \"P1\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Corregge il numero di un firmatario e gli rimanda lo stesso link. Non nasce un consenso nuovo e la quota non si consuma. Puoi correggere il numero al massimo tre volte per ogni firmatario.\n\nPermesso: consents:create\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-correct-phone"
          },
          "response": []
        },
        {
          "name": "Risolvi una difformità sui dati del minore",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/resolve-mismatch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "resolve-mismatch"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"acceptFrom\": \"P1\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Serve con la doppia firma, quando i due genitori hanno dichiarato dati del minore diversi e il consenso è fermo in ACTION_REQUIRED. Scegli quale versione vale: il PDF con le due firme viene generato e il consenso diventa COMPLETED.\n\nPermesso: consents:create\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-resolve-mismatch"
          },
          "response": []
        },
        {
          "name": "Chiudi una difformità non risolvibile",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/cancel-mismatch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "cancel-mismatch"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Chiude un consenso quando la difformità sui dati del minore non si può risolvere, per esempio per uno scambio di persona. Il consenso prende uno stato suo, diverso da quello di un annullamento a mano.\n\nPermesso: consents:cancel\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-cancel-mismatch"
          },
          "response": []
        },
        {
          "name": "Riapri sul tablet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/reopen-in-studio",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "reopen-in-studio"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "È il «Riapri sul tablet» della dashboard. Un consenso da firmare in studio esce dalla coda del tablet dopo 12 ore: se il paziente torna, questa chiamata lo rimette in coda con lo stesso link e senza consumare quota.\n\nPermesso: consents:create\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-reopen-in-studio"
          },
          "response": []
        },
        {
          "name": "Sollecita la controfirma",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/countersign/remind",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "countersign",
                "remind"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Tatuaggi e piercing: manda all'esecutore il link per controfirmare, come «Invia ora» in dashboard. La controfirma vera non passa dall'API: è una sottoscrizione personale dell'esecutore, con un suo fattore (app di autenticazione o codice sul suo telefono), e deve restare sua. Puoi mandare il link una volta ogni 10 minuti per esecutore.\n\nPermesso: consents:countersign\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-countersign-remind"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Documenti",
      "description": "I PDF firmati, il fascicolo difensivo e l'invio dei PDF per email.",
      "item": [
        {
          "name": "PDF del consenso firmato",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "pdf"
              ],
              "query": [
                {
                  "key": "redirect",
                  "value": "1",
                  "description": "`1` (o `true`) per ricevere un 302 verso il file invece del JSON.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce un link temporaneo al PDF del consenso firmato, valido un'ora. Il file resta in uno spazio privato e non ha un indirizzo pubblico.\n\nPermesso: consents:documents\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-pdf"
          },
          "response": []
        },
        {
          "name": "PDF dell'informativa privacy",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/privacy-pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "privacy-pdf"
              ],
              "query": [
                {
                  "key": "redirect",
                  "value": "1",
                  "description": "`1` (o `true`) per ricevere un 302 verso il file invece del JSON.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce un link temporaneo al PDF dell'informativa privacy firmata dal paziente, valido un'ora.\n\nPermesso: consents:documents\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-privacy-pdf"
          },
          "response": []
        },
        {
          "name": "PDF della lettera d'incarico",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/engagement-pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "engagement-pdf"
              ],
              "query": [
                {
                  "key": "redirect",
                  "value": "1",
                  "description": "`1` (o `true`) per ricevere un 302 verso il file invece del JSON.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce un link temporaneo al PDF della lettera d'incarico sottoscritta dal paziente, valido un'ora.\n\nPermesso: consents:documents\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-engagement-pdf"
          },
          "response": []
        },
        {
          "name": "Fascicolo difensivo del consenso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/dossier",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "dossier"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "json",
                  "description": "`json` per ricevere `contentBase64` invece dei byte del PDF; `pdf` (o nessun valore) per il file.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce il fascicolo difensivo: un PDF unico con consenso, anamnesi, registro dei lotti e prova d'integrità della catena di audit. Si genera al momento, quindi arriva direttamente nel corpo come application/pdf, oppure in base64 con `?format=json`.\n\nPermesso: consents:documents\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-dossier"
          },
          "response": []
        },
        {
          "name": "Manda i PDF al paziente per email",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/send-pdf-email",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "send-pdf-email"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"archivio@studio.it\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Manda, o rimanda, i PDF firmati al paziente per email. Senza `email` usa l'indirizzo lasciato alla firma.\n\nPermesso: consents:documents\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-send-pdf-email"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Pazienti",
      "description": "Anagrafiche, note e documenti del paziente.",
      "item": [
        {
          "name": "Elenco e ricerca dei pazienti",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients"
              ],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "description": "Nome, cognome o telefono. Un valore che è un codice fiscale ben formato viene cercato come tale (per hash).",
                  "disabled": true
                },
                {
                  "key": "fiscalCode",
                  "value": "RSSMRA80A01F205X",
                  "description": "Codice fiscale esatto: ricerca per hash, mai in chiaro a database.",
                  "disabled": true
                },
                {
                  "key": "externalId",
                  "value": "CRM-4412",
                  "description": "Il tuo riferimento del gestionale, esatto.",
                  "disabled": true
                },
                {
                  "key": "sedeId",
                  "value": "",
                  "description": "Sede della struttura (in alternativa all'intestazione X-Structure-Sede-Id).",
                  "disabled": true
                },
                {
                  "key": "executorMemberId",
                  "value": "",
                  "description": "Solo i pazienti con almeno un consenso eseguito da quel professionista.",
                  "disabled": true
                },
                {
                  "key": "apiTest",
                  "value": "true",
                  "description": "`true` = solo le anagrafiche di prova, `false` = solo quelle vere.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Da 1 a 100 (predefinito 25).",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "Cursore della pagina successiva (campo `nextCursor`).",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce le anagrafiche, con la ricerca. Il telefono esce in chiaro: sei il titolare del trattamento e in dashboard lo vedi già per intero. Ogni riga porta lo stato della privacy, così sai subito se puoi mandare un «solo consenso» o se serve l'informativa completa.\n\nPermesso: patients:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients"
          },
          "response": []
        },
        {
          "name": "Crea o ritrova un paziente",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"firstName\": \"Mario\",\n  \"lastName\": \"Rossi\",\n  \"phone\": \"+393331112233\",\n  \"fiscalCode\": \"RSSMRA80A01F205X\",\n  \"externalId\": \"CRM-4412\",\n  \"notes\": \"Inviato dal gestionale\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Crea l'anagrafica, oppure ritrova quella che esiste già. La ricerca dei doppioni è la stessa dell'archivio: prima il codice fiscale, poi `externalId`, poi il telefono. Se telefono e nome coincidono è la stessa persona e ricevi 200 con `created: false`. Se il telefono coincide ma il nome no, ricevi 409, come in dashboard. Se due anagrafiche si rivelano la stessa persona vengono unite: ricevi `merged: true` e il webhook `patient.merged` con l'id che da quel momento non vale più.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-patients"
          },
          "response": []
        },
        {
          "name": "Allinea un paziente dal tuo CRM",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/identity",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                "identity"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"CRM-4412\",\n  \"fiscalCode\": \"RSSMRA80A01F205X\",\n  \"firstName\": \"Mario\",\n  \"lastName\": \"Rossi\",\n  \"phone\": \"+393331112233\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Registra, o ritrova, una persona per `externalId` o `fiscalCode`. Puoi ripetere la chiamata quante volte vuoi senza creare doppioni. È la chiamata con cui allinei il tuo CRM prima ancora di avere un consenso da mandare.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-patients-identity"
          },
          "response": []
        },
        {
          "name": "Scheda del paziente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce la scheda completa: anagrafica, identità (`externalId` e se il codice fiscale è registrato), privacy per soggetto con le clausole accettate e rifiutate, anamnesi in forma di semaforo, consensi, visite e cicli, documenti e note.\n\nPermesso: patients:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid"
          },
          "response": []
        },
        {
          "name": "Modifica l'anagrafica",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone\": \"+393339998877\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Modifica i soli campi anagrafici: nome, cognome, telefono, `externalId`, note e sede. Un campo fuori da questo elenco è un errore 400, non una riga ignorata in silenzio. I dati che il paziente ha dichiarato e firmato nel consenso (nascita, residenza, codice fiscale sul documento) non si toccano: sono congelati sul consenso perché sono la prova di cosa aveva davanti quando ha firmato.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-patients-patientid"
          },
          "response": []
        },
        {
          "name": "Consensi del paziente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/consents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "consents"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce l'elenco breve dei consensi del paziente, senza il resto della scheda. Per il dettaglio di uno usa `GET /consents/{id}`.\n\nPermesso: patients:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-consents"
          },
          "response": []
        },
        {
          "name": "Leggi le note della scheda",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/notes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "notes"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce le note della scheda. Nel prodotto le note sono un unico campo libero, non un elenco di note con un id ciascuna: per questo non esiste un `DELETE /notes/{noteId}`.\n\nPermesso: patients:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-notes"
          },
          "response": []
        },
        {
          "name": "Sostituisci le note",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/notes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "notes"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"notes\": \"Preferisce essere contattato al mattino.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sostituisce l'intero testo delle note.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-patients-patientid-notes"
          },
          "response": []
        },
        {
          "name": "Aggiungi una riga alle note",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/notes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "notes"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"text\": \"Richiamare per il controllo.\",\n  \"author\": \"Segreteria\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Accoda in fondo una riga datata, nella forma «[2026-09-16 · Autore] testo»: è quello che fa a mano chi scrive in quel riquadro.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-patients-patientid-notes"
          },
          "response": []
        },
        {
          "name": "Svuota le note",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/notes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "notes"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Svuota il campo delle note della scheda.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-patients-patientid-notes"
          },
          "response": []
        },
        {
          "name": "Documenti del paziente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/documents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "documents"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce l'elenco dei documenti del paziente (nulla osta del medico, prescrizioni, allegati) con tipo, nome, dimensione, chi l'ha caricato e consenso collegato.\n\nPermesso: patients:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-documents"
          },
          "response": []
        },
        {
          "name": "Carica un documento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/documents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "documents"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"fileName\": \"nulla-osta.pdf\",\n  \"mimeType\": \"application/pdf\",\n  \"contentBase64\": \"JVBERi0xLjQKJcOkw7zDtsOfCjEgMCBvYmoKPDwvVHlwZS9DYXRhbG9nL1BhZ2VzIDIgMCBSPj4KZW5kb2JqCjIgMCBvYmoKPDwvVHlwZS9QYWdlcy9LaWRzWzMgMCBSXS9Db3VudCAxPj4KZW5kb2JqCjMgMCBvYmoKPDwvVHlwZS9QYWdlL1BhcmVudCAyIDAgUi9NZWRpYUJveFswIDAgNjEyIDc5Ml0+PgplbmRvYmoKdHJhaWxlcgo8PC9Sb290IDEgMCBSPj4KJSVFT0YK\",\n  \"note\": \"Nulla osta del medico curante\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Carica un documento del paziente in `multipart/form-data` con il campo `file`, oppure in JSON con `fileName`, `mimeType` e `contentBase64`. Accettati JPG, PNG, WebP e PDF fino a 10 MB: il tipo dichiarato viene confrontato col contenuto reale del file, quindi un PDF rinominato .jpg viene rifiutato.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-patients-patientid-documents"
          },
          "response": []
        },
        {
          "name": "Scarica un documento",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/documents/:docId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "documents",
                ":docId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                },
                {
                  "key": "docId",
                  "value": "c4d5e6f7-0a1b-4c2d-8e3f-4a5b6c7d8e9f",
                  "description": "Id del documento del paziente."
                }
              ]
            },
            "description": "Restituisce un link temporaneo al documento, valido un'ora. Il file resta in uno spazio privato e non ha un indirizzo pubblico.\n\nPermesso: consents:documents\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-documents-docid"
          },
          "response": []
        },
        {
          "name": "Elimina un documento",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/documents/:docId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "documents",
                ":docId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                },
                {
                  "key": "docId",
                  "value": "c4d5e6f7-0a1b-4c2d-8e3f-4a5b6c7d8e9f",
                  "description": "Id del documento del paziente."
                }
              ]
            },
            "description": "Elimina un documento caricato dal centro. Quelli che il paziente carica durante la firma fanno parte del fascicolo probatorio e non si eliminano.\n\nPermesso: patients:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-patients-patientid-documents-docid"
          },
          "response": []
        }
      ]
    },
    {
      "name": "GDPR",
      "description": "Informativa privacy, revoca, export e cancellazione dei dati.",
      "item": [
        {
          "name": "Stato dell'informativa privacy",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/privacy",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "privacy"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce lo stato dell'informativa privacy per soggetto: una voce per l'adulto e per ciascun minore o tutelato, con documento, data, codice di controllo, clausole ed eventuale revoca.\n\nPermesso: patients:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-privacy"
          },
          "response": []
        },
        {
          "name": "Clausole revocabili",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/privacy/:consentId/revocable",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "privacy",
                ":consentId",
                "revocable"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                },
                {
                  "key": "consentId",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso che porta l'informativa privacy firmata."
                }
              ]
            },
            "description": "Dice quali clausole facoltative si possono revocare su quel documento privacy firmato e cosa è già stato revocato.\n\nPermesso: patients:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-privacy-consentid-revocable"
          },
          "response": []
        },
        {
          "name": "Revoca consensi privacy facoltativi",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/privacy/revoke",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "privacy",
                "revoke"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"consentId\": \"3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09\",\n  \"items\": [\n    \"consent-marketing\"\n  ],\n  \"confirm\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Revoca i consensi facoltativi (art. 7.3 GDPR). La revoca si registra su un documento firmato, quindi serve `consentId`: un paziente può avere più informative (una per soggetto, o rifirmate nel tempo) e revocarle tutte insieme sarebbe un atto che nessuno ha chiesto. Gli effetti sono identici alla dashboard, conferma scritta al firmatario compresa.\n\nPermesso: patients:delete (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-patients-patientid-privacy-revoke"
          },
          "response": []
        },
        {
          "name": "Esporta i dati del paziente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/export",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "export"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Esporta i dati del paziente per l'accesso e la portabilità (art. 15 e 20 GDPR): anagrafica, consensi decifrati, registro attività e i link temporanei ai PDF sottoscritti, validi un'ora. Ogni export finisce nel Registro attività.\n\nPermesso: patients:export (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-export"
          },
          "response": []
        },
        {
          "name": "Fascicolo difensivo del paziente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/dossier",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "dossier"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "json",
                  "description": "`json` per ricevere `contentBase64` invece dei byte del PDF; `pdf` (o nessun valore) per il file.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce il fascicolo difensivo del paziente in un PDF unico, generato al momento. Arriva nel corpo come application/pdf, oppure in base64 con `?format=json`.\n\nPermesso: patients:export (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-dossier"
          },
          "response": []
        },
        {
          "name": "Chiedi la cancellazione (art. 17)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/gdpr-delete",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "gdpr-delete"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"confirm\": true,\n  \"reason\": \"Richiesta dell'interessato del 16/09/2026\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Programma la cancellazione definitiva (art. 17 GDPR) senza eseguirla subito. L'anagrafica sparisce all'istante da liste, ricerche, scheda e invii, e da quel momento risponde 404 ovunque tranne sull'annullamento; i dati vengono distrutti dopo 7 giorni. Fino ad allora il titolare può fermare tutto dalla dashboard, e tu con `POST /gdpr-delete/cancel`. In dashboard la cancellazione la autorizza una persona che digita la propria password in quel momento; qui la autorizza una chiave configurata una volta, e un ciclo sbagliato del gestionale distruggerebbe in pochi minuti la prova di consenso di centinaia di prestazioni. Se ti serve cancellare all'istante, si fa dalla dashboard.\n\nPermesso: patients:delete (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-patients-patientid-gdpr-delete"
          },
          "response": []
        },
        {
          "name": "Annulla una cancellazione programmata",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/gdpr-delete/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "gdpr-delete",
                "cancel"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Ferma una cancellazione programmata: il paziente torna raggiungibile e i dati non vengono distrutti. È l'unico endpoint che vede un'anagrafica già nascosta. Lo stesso pulsante c'è nella scheda del paziente in dashboard, e il titolare lo riceve nell'email di avviso.\n\nPermesso: patients:delete (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-patients-patientid-gdpr-delete-cancel"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Visite",
      "description": "Visite e cicli di trattamento.",
      "item": [
        {
          "name": "Visite del paziente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/visits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "visits"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce le visite del paziente raggruppate per ciclo di trattamento, e le stesse visite in un elenco semplice per chi non usa i cicli.\n\nPermesso: visits:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-visits"
          },
          "response": []
        },
        {
          "name": "Registra una visita",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/visits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "visits"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"Dolore alla spalla\",\n  \"cycleTitle\": \"Riabilitazione spalla\",\n  \"isFirstVisit\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Registra una visita. Può essere collegata a un consenso firmato e può essere intestata a un minore o a un tutelato indicando `subjectConsentId`. Il ciclo nasce con la prima visita (`cycleTitle`): è così anche in dashboard, non esiste un «crea ciclo» a sé.\n\nPermesso: visits:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-patients-patientid-visits"
          },
          "response": []
        },
        {
          "name": "Modifica una visita",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/visits/:visitId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "visits",
                ":visitId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                },
                {
                  "key": "visitId",
                  "value": "d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a",
                  "description": "Id della visita."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"notes\": \"Migliora la mobilità.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Modifica motivo, patologia, note, soggetto e il segno di prima visita.\n\nPermesso: visits:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-patients-patientid-visits-visitid"
          },
          "response": []
        },
        {
          "name": "Elimina una visita",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/visits/:visitId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "visits",
                ":visitId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                },
                {
                  "key": "visitId",
                  "value": "d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a",
                  "description": "Id della visita."
                }
              ]
            },
            "description": "Elimina la visita, come in dashboard.\n\nPermesso: visits:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-patients-patientid-visits-visitid"
          },
          "response": []
        },
        {
          "name": "Cicli di trattamento",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/cycles",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "cycles"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                }
              ]
            },
            "description": "Restituisce i cicli di trattamento del paziente, con il numero di visite di ciascuno.\n\nPermesso: visits:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-patients-patientid-cycles"
          },
          "response": []
        },
        {
          "name": "Modifica un ciclo",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/cycles/:cycleId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "cycles",
                ":cycleId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                },
                {
                  "key": "cycleId",
                  "value": "e2f3a4b5-c6d7-4e8f-9a0b-1c2d3e4f5a6b",
                  "description": "Id del ciclo di trattamento."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"isActive\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cambia il titolo del percorso o lo chiude (`isActive: false`).\n\nPermesso: visits:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-patients-patientid-cycles-cycleid"
          },
          "response": []
        },
        {
          "name": "Elimina un ciclo",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/patients/:patientId/cycles/:cycleId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "patients",
                ":patientId",
                "cycles",
                ":cycleId"
              ],
              "variable": [
                {
                  "key": "patientId",
                  "value": "8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e",
                  "description": "Id del paziente."
                },
                {
                  "key": "cycleId",
                  "value": "e2f3a4b5-c6d7-4e8f-9a0b-1c2d3e4f5a6b",
                  "description": "Id del ciclo di trattamento."
                }
              ]
            },
            "description": "Elimina il ciclo di trattamento. Cancellare un ciclo cancella anche le sue visite.\n\nPermesso: visits:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-patients-patientid-cycles-cycleid"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Anamnesi",
      "description": "Le risposte complete dell'anamnesi raccolta alla firma.",
      "item": [
        {
          "name": "Anamnesi completa di un consenso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/anamnesis",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "anamnesis"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce l'anamnesi completa raccolta alla firma del consenso: risposte decifrate, risposte positive già etichettate, flag di rischio con la loro etichetta, fototipo e semaforo sui trattamenti di quel consenso. Copre l'anamnesi medica (sanità, se attiva sull'account), quella estetica (centri estetici e account ibridi) e le domande personalizzate delle strutture «Associazione». Sono dati sanitari: ogni lettura finisce nel Registro attività, come la consultazione dalla dashboard.\n\nPermesso: anamnesis:read (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-anamnesis"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Struttura",
      "description": "Sedi, professionisti, inviti, esecutore generico, controfirme e statistiche.",
      "item": [
        {
          "name": "Riepilogo della struttura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure"
              ]
            },
            "description": "Restituisce il riepilogo della struttura: tipo di account, sedi, professionisti con «chi esegue cosa», esecutore generico per ambito, controfirme in attesa aggregate e se c'è una segreteria. Risponde anche al professionista singolo, con `type: INDIVIDUAL` e liste vuote.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure"
          },
          "response": []
        },
        {
          "name": "Elenco delle sedi",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/sedi",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "sedi"
              ]
            },
            "description": "Restituisce le sedi attive della struttura.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-sedi"
          },
          "response": []
        },
        {
          "name": "Aggiungi una sede",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/sedi",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "sedi"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Sede Verona\",\n  \"address\": \"Via Roma 1\",\n  \"city\": \"Verona\",\n  \"cap\": \"37100\",\n  \"province\": \"VR\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aggiunge una sede con le regole della dashboard: nelle strutture sanitarie la gestisce solo il titolare, negli studi le sedi dello studio coincidono con quelle del profilo.\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-structure-sedi"
          },
          "response": []
        },
        {
          "name": "Dettaglio di una sede",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/sedi/:sedeId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "sedi",
                ":sedeId"
              ],
              "variable": [
                {
                  "key": "sedeId",
                  "value": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
                  "description": "Id della sede."
                }
              ]
            },
            "description": "Restituisce una sede con i professionisti che ci lavorano.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-sedi-sedeid"
          },
          "response": []
        },
        {
          "name": "Modifica una sede",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/sedi/:sedeId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "sedi",
                ":sedeId"
              ],
              "variable": [
                {
                  "key": "sedeId",
                  "value": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
                  "description": "Id della sede."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"address\": \"Via Mazzini 12\",\n  \"cap\": \"37121\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Modifica nome e indirizzo di una sede. Tutti i campi sono facoltativi, ma ne serve almeno uno.\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-structure-sedi-sedeid"
          },
          "response": []
        },
        {
          "name": "Disattiva una sede",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/sedi/:sedeId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "sedi",
                ":sedeId"
              ],
              "variable": [
                {
                  "key": "sedeId",
                  "value": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
                  "description": "Id della sede."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reassignToSedeId\": \"5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Disattiva la sede come in dashboard (la storia dei consensi resta). Chi lavora anche in altre sedi perde solo questa. Chi lavora solo qui va spostato: nelle strutture sanitarie sulla sede indicata in `reassignToSedeId` (o sulla prima rimasta), negli studi la disattivazione si ferma con 409 `SEDE_HAS_MEMBERS` e l'elenco, finché non indichi `reassignToSedeId`. La segreteria rimasta senza sedi viene sospesa. L'ultima sede attiva non si toglie.\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-structure-sedi-sedeid"
          },
          "response": []
        },
        {
          "name": "Elenco dei professionisti",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/members",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "members"
              ],
              "query": [
                {
                  "key": "sedeId",
                  "value": "",
                  "description": "Solo i professionisti di quella sede.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "ACTIVE",
                  "description": "Stato del professionista.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce i professionisti della struttura, con «chi esegue cosa» e l'accesso. La segreteria non compare.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-members"
          },
          "response": []
        },
        {
          "name": "Aggiungi un professionista senza accesso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/members",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "members"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"firstName\": \"Paola\",\n  \"lastName\": \"Fisio\",\n  \"relationshipType\": \"EMPLOYEE\",\n  \"sedeIds\": [\n    \"5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d\"\n  ],\n  \"professions\": [\n    \"PHYSIOTHERAPIST\"\n  ],\n  \"enabledTreatmentIds\": [\n    \"fis-terapia-manuale\"\n  ],\n  \"onlyAssignedModels\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Crea un professionista senza accesso (un'anagrafica che esegue, come in dashboard): per dargli un accesso si usa un invito. Nelle strutture sanitarie si indicano professioni, trattamenti abilitati e «solo modelli assegnati»; negli studi tatuaggi telefono (per la controfirma) e capacità, e al professionista parte il link per confermare il numero (al massimo 10 link al giorno per account).\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-structure-members"
          },
          "response": []
        },
        {
          "name": "Dettaglio di un professionista",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/members/:memberId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "members",
                ":memberId"
              ],
              "variable": [
                {
                  "key": "memberId",
                  "value": "6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e",
                  "description": "Id del professionista della struttura."
                }
              ]
            },
            "description": "Restituisce un professionista nella stessa forma dell'elenco.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-members-memberid"
          },
          "response": []
        },
        {
          "name": "Modifica un professionista",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/members/:memberId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "members",
                ":memberId"
              ],
              "variable": [
                {
                  "key": "memberId",
                  "value": "6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e",
                  "description": "Id del professionista della struttura."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"onlyAssignedModels\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cambia «chi esegue cosa», sedi, stato (ACTIVE / SUSPENDED) e dati dei documenti. Di chi ha un accesso (utenza collegata o invito aperto) nome, codice fiscale e, negli studi, telefono ed email restano della dashboard. Negli studi la sospensione segue le regole della dashboard: con controfirme in attesa chiede prima a chi passarle (409). Negli studi un cambio di numero manda un nuovo link di verifica (al massimo 5 al giorno per professionista).\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-structure-members-memberid"
          },
          "response": []
        },
        {
          "name": "Rimuovi un professionista",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/members/:memberId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "members",
                ":memberId"
              ],
              "query": [
                {
                  "key": "reassignTo",
                  "value": "",
                  "description": "Studi: id del professionista a cui passano le controfirme in attesa. Si può mandare anche nel corpo JSON.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "memberId",
                  "value": "6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e",
                  "description": "Id del professionista della struttura."
                }
              ]
            },
            "description": "Rimuove il professionista dall'organico come in dashboard (stato REVOKED, i consensi eseguiti restano suoi). Negli studi tatuaggi, con controfirme in attesa, serve `reassignTo` con il professionista che le prende.\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-structure-members-memberid"
          },
          "response": []
        },
        {
          "name": "Inviti in attesa",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/invites",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "invites"
              ]
            },
            "description": "Restituisce gli inviti con accesso che aspettano di essere accettati.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-invites"
          },
          "response": []
        },
        {
          "name": "Invita un collaboratore con accesso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/invites",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "invites"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"firstName\": \"Irene\",\n  \"lastName\": \"Invitata\",\n  \"email\": \"irene@example.com\",\n  \"relationshipType\": \"EMPLOYEE\",\n  \"role\": \"REFERENTE\",\n  \"sedeIds\": [\n    \"5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Invita un collaboratore con accesso: parte l'email con il link per creare o collegare l'account. Nelle strutture sanitarie l'invito porta con sé l'anagrafica del medico (stessi campi di POST /structure/members più `email`); negli studi email, nome, ruolo e capacità. Tetti: 10 inviti al giorno per account e 3 allo stesso indirizzo (giornata di Roma). Non si invita l'indirizzo del titolare, né chi è già un professionista della struttura; un invito ancora in attesa per lo stesso indirizzo è un 409 con il suo id.\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-structure-invites"
          },
          "response": []
        },
        {
          "name": "Revoca un invito",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/invites/:inviteId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "invites",
                ":inviteId"
              ],
              "variable": [
                {
                  "key": "inviteId",
                  "value": "7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
                  "description": "Id dell'invito."
                }
              ]
            },
            "description": "Revoca un invito non ancora accettato: il link smette di funzionare.\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-structure-invites-inviteid"
          },
          "response": []
        },
        {
          "name": "Esecutore generico per ambito",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/generic-executor",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "generic-executor"
              ]
            },
            "description": "Restituisce la configurazione dell'invio «senza professionista nominato» per ambito, che esiste solo nelle strutture sanitarie: il consenso esce intestato alla struttura con una qualifica al posto del medico. Il tatuaggio è escluso per legge.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-generic-executor"
          },
          "response": []
        },
        {
          "name": "Imposta l'esecutore generico",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/generic-executor",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "generic-executor"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enabled\": true,\n  \"scopes\": [\n    \"PSYCHOLOGIST\"\n  ],\n  \"texts\": {\n    \"PSYCHOLOGIST\": \"Psicologo iscritto all'Albo della struttura\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Accende o spegne la modalità «senza professionista nominato» e ne imposta ambiti e testi, con le regole del profilo della dashboard.\n\nPermesso: structure:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-structure-generic-executor"
          },
          "response": []
        },
        {
          "name": "Controfirme in attesa",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/countersigns/pending",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "countersigns",
                "pending"
              ]
            },
            "description": "Restituisce i consensi firmati dal cliente che aspettano la controfirma dell'esecutore (tatuaggi e piercing), per professionista e per sede: lo stesso riquadro della dashboard.\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-countersigns-pending"
          },
          "response": []
        },
        {
          "name": "Statistiche della struttura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/structure/stats",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "structure",
                "stats"
              ],
              "query": [
                {
                  "key": "sedeId",
                  "value": "",
                  "description": "Solo quella sede (di questa struttura). In conflitto con X-Structure-Sede-Id è 403.",
                  "disabled": true
                },
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Solo quel professionista.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "2026-09-01",
                  "description": "Inizio del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30",
                  "description": "Fine del periodo (AAAA-MM-GG): comprende tutta la giornata.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce la panoramica storica per sede e professionista della pagina Struttura, più le statistiche della dashboard con i filtri richiesti (e, nelle strutture sanitarie, quelle per medico).\n\nPermesso: structure:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-structure-stats"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Configurazione",
      "description": "Modelli, trattamenti abilitati, informativa, incarico, lingue, interruttori e moduli Agorà.",
      "item": [
        {
          "name": "Elenco dei modelli",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations"
              ]
            },
            "description": "Restituisce i modelli di consenso dell'account con il limite dei modelli personalizzati: 10, oppure 30 per le strutture. I moduli Agorà non contano.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-configurations"
          },
          "response": []
        },
        {
          "name": "Crea un modello",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Prima visita\",\n  \"mode\": \"SPECIFIC\",\n  \"professionType\": \"PSYCHOLOGIST\",\n  \"treatments\": [\n    \"psi-colloquio\",\n    \"psi-valutazione\"\n  ],\n  \"isDefault\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Crea un modello con tutte le validazioni della dashboard: un modello sbagliato bloccherebbe gli invii, quindi qui non passa. Nessun valore viene corretto in silenzio: professionisti non ammessi o doppia firma non prevista sono errori.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-configurations"
          },
          "response": []
        },
        {
          "name": "Dettaglio di un modello",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations/:configId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations",
                ":configId"
              ],
              "variable": [
                {
                  "key": "configId",
                  "value": "clx8k2m4p0001qz7h3v5n9b2d",
                  "description": "Id del modello di consenso."
                }
              ]
            },
            "description": "Restituisce un modello nella stessa forma dell'elenco.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-configurations-configid"
          },
          "response": []
        },
        {
          "name": "Sostituisci un modello",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations/:configId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations",
                ":configId"
              ],
              "variable": [
                {
                  "key": "configId",
                  "value": "clx8k2m4p0001qz7h3v5n9b2d",
                  "description": "Id del modello di consenso."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Prima visita\",\n  \"mode\": \"SPECIFIC\",\n  \"professionType\": \"PSYCHOLOGIST\",\n  \"treatments\": [\n    \"psi-colloquio\"\n  ],\n  \"isDefault\": true,\n  \"sendMethod\": \"WHATSAPP\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sostituisce il modello intero, come il salvataggio della dashboard: i campi facoltativi non inviati tornano al valore predefinito (nessun canale, nessuna scadenza, nessun rinnovo, documento medico automatico, nessun professionista associato). Per cambiare solo alcuni campi usa PATCH. Nei modelli Agorà e in quelli con il testo del centro vale come PATCH e si cambiano solo canale, predefinito, doppia firma, documento medico e professionisti.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-configurations-configid"
          },
          "response": []
        },
        {
          "name": "Modifica un modello",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations/:configId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations",
                ":configId"
              ],
              "variable": [
                {
                  "key": "configId",
                  "value": "clx8k2m4p0001qz7h3v5n9b2d",
                  "description": "Id del modello di consenso."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sendMethod\": \"SMS\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cambia solo i campi inviati: tutti gli altri restano come sono salvati. Le validazioni valgono sul modello che risulterebbe. I campi sono gli stessi di POST /configurations, tutti facoltativi; ne serve almeno uno.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-configurations-configid"
          },
          "response": []
        },
        {
          "name": "Elimina un modello",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations/:configId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations",
                ":configId"
              ],
              "variable": [
                {
                  "key": "configId",
                  "value": "clx8k2m4p0001qz7h3v5n9b2d",
                  "description": "Id del modello di consenso."
                }
              ]
            },
            "description": "Elimina un modello. I consensi già inviati o programmati con quel modello restano e perdono solo il riferimento.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-configurations-configid"
          },
          "response": []
        },
        {
          "name": "Rendi predefinito un modello",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations/:configId/default",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations",
                ":configId",
                "default"
              ],
              "variable": [
                {
                  "key": "configId",
                  "value": "clx8k2m4p0001qz7h3v5n9b2d",
                  "description": "Id del modello di consenso."
                }
              ]
            },
            "description": "Rende il modello predefinito: gli altri perdono il segno.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-configurations-configid-default"
          },
          "response": []
        },
        {
          "name": "Togli il predefinito",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations/:configId/default",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations",
                ":configId",
                "default"
              ],
              "variable": [
                {
                  "key": "configId",
                  "value": "clx8k2m4p0001qz7h3v5n9b2d",
                  "description": "Id del modello di consenso."
                }
              ]
            },
            "description": "Toglie il predefinito senza sceglierne un altro.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-configurations-configid-default"
          },
          "response": []
        },
        {
          "name": "Anteprima di un modello",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/configurations/:configId/preview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "configurations",
                ":configId",
                "preview"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "pdf",
                  "description": "`pdf` (predefinito) o `json`.",
                  "disabled": true
                },
                {
                  "key": "lang",
                  "value": "it",
                  "description": "Solo `it`. Un'altra lingua è 400 PREVIEW_LANGUAGE_NOT_AVAILABLE.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "configId",
                  "value": "clx8k2m4p0001qz7h3v5n9b2d",
                  "description": "Id del modello di consenso."
                }
              ]
            },
            "description": "Restituisce l'anteprima del consenso (Doc 2) che firmerà il paziente con questo modello, senza dati del paziente. Si genera al momento e arriva come PDF nel corpo (con `?format=json` in base64). È in italiano come in dashboard; per i testi in un'altra lingua attiva c'è GET /template-config/preview.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-configurations-configid-preview"
          },
          "response": []
        },
        {
          "name": "Trattamenti abilitati e impostazioni",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/template-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "template-config"
              ],
              "query": [
                {
                  "key": "professionType",
                  "value": "PSYCHOLOGIST",
                  "description": "Professione o ambito della riga (predefinito: la principale).",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce i trattamenti abilitati per professione (la preselezione all'invio senza modello), le impostazioni, i trattamenti personalizzati e le clausole privacy facoltative, che sono condivise fra le professioni e vivono sulla principale.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-template-config"
          },
          "response": []
        },
        {
          "name": "Aggiorna trattamenti e impostazioni",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/template-config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "template-config"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"treatments\": [\n    \"psi-colloquio\"\n  ],\n  \"enabledOptionalConsents\": [\n    \"consent-reminders\",\n    \"consent-marketing\"\n  ],\n  \"settings\": {\n    \"templateMode\": \"specific\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Scrive trattamenti abilitati, impostazioni, trattamenti personalizzati e clausole facoltative. Tutto è validato prima di scrivere.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-template-config"
          },
          "response": []
        },
        {
          "name": "Anteprima dei documenti dell'account",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/template-config/preview?doc=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "template-config",
                "preview"
              ],
              "query": [
                {
                  "key": "doc",
                  "value": "1",
                  "description": "1 per l'informativa privacy, 2 per il consenso.",
                  "disabled": false
                },
                {
                  "key": "lang",
                  "value": "it",
                  "description": "it, en, fr o de. Le lingue diverse dall'italiano devono essere attive (GET /languages).",
                  "disabled": true
                },
                {
                  "key": "professionType",
                  "value": "",
                  "description": "Professione o ambito.",
                  "disabled": true
                },
                {
                  "key": "format",
                  "value": "pdf",
                  "description": "`pdf` (predefinito) o `json`.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce l'anteprima dei documenti dell'account (1 = informativa privacy, 2 = consenso), anche in una lingua attiva: è la stessa della pagina «Il tuo consenso».\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-template-config-preview"
          },
          "response": []
        },
        {
          "name": "Informativa privacy e clausole facoltative",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/privacy-policy",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "privacy-policy"
              ]
            },
            "description": "Restituisce l'informativa personalizzata dell'account, se c'è, le clausole facoltative attive con il loro catalogo e, per le strutture, se l'informativa si invia.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-privacy-policy"
          },
          "response": []
        },
        {
          "name": "Scegli le clausole facoltative",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/privacy-policy",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "privacy-policy"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enabledOptionalConsents\": [\n    \"consent-reminders\",\n    \"consent-photos\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sceglie le clausole facoltative e, per le strutture, se inviare l'informativa. I testi di un'informativa personalizzata li carica ConsensoSicuro: non si scrivono né dalla dashboard né via API.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-privacy-policy"
          },
          "response": []
        },
        {
          "name": "Lettera d'incarico",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/engagement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "engagement"
              ],
              "query": [
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Strutture: incarico di quel medico (la polizza resta quella della struttura).",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce la lettera d'incarico (sanità) o le condizioni di servizio (centri con un modello assegnato), cioè la configurazione della dashboard con il catalogo delle clausole. Le strutture la leggono per singolo medico con `memberId`.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-engagement"
          },
          "response": []
        },
        {
          "name": "Aggiorna la lettera d'incarico",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/engagement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "engagement"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"enabled\": true,\n  \"clauses\": {},\n  \"insurance\": {\n    \"company\": \"Assicurazioni Prova\",\n    \"policyNumber\": \"RC-123\",\n    \"coverage\": \"1.000.000 €\",\n    \"expiresAt\": \"2027-12-31\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Scrive la configurazione dell'incarico con le regole della dashboard: con l'incarico attivo servono gli estremi della polizza RC in corso di validità e il massimale.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-engagement"
          },
          "response": []
        },
        {
          "name": "Incarico valido all'invio",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/engagement/send-state",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "engagement",
                "send-state"
              ],
              "query": [
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Strutture: il medico esecutore scelto.",
                  "disabled": true
                }
              ]
            },
            "description": "Dice quale incarico vale all'invio e se la polizza è valida, come il dialog di invio della dashboard. Con l'incarico spento la risposta è ridotta a `available`, `enabled` e `catalog`; con l'incarico acceso porta anche `isBase` (vale la configurazione della struttura o quella del medico), `insuranceValid`, `clauses`, `priceList` e `perSendVars`.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-engagement-send-state"
          },
          "response": []
        },
        {
          "name": "Anteprima dell'incarico",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/engagement/preview",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "engagement",
                "preview"
              ],
              "query": [
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Strutture: incarico di quel medico.",
                  "disabled": true
                },
                {
                  "key": "professionType",
                  "value": "",
                  "description": "Professione con cui simulare l'invio.",
                  "disabled": true
                },
                {
                  "key": "language",
                  "value": "it",
                  "description": "en, fr o de per i modelli personalizzati tradotti.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce l'anteprima del documento d'incarico salvato, come lo vedrà il paziente con un consenso generico.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-engagement-preview"
          },
          "response": []
        },
        {
          "name": "Lingue attive",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/languages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "languages"
              ]
            },
            "description": "Restituisce le lingue in cui l'account può inviare. L'italiano c'è sempre, e `available` dice quali altre si possono attivare.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-languages"
          },
          "response": []
        },
        {
          "name": "Imposta le lingue",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/languages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "languages"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"languages\": [\n    \"it\",\n    \"en\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Imposta le lingue attive con le regole del profilo: solo per le professioni coperte dalle traduzioni (psicologia, psicoterapia, tatuaggi) e mai per le strutture.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-languages"
          },
          "response": []
        },
        {
          "name": "Interruttori del profilo",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/settings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "settings"
              ]
            },
            "description": "Restituisce gli interruttori del profilo, ciascuno con il suo valore e con `available`, che dice se per questo account l'interruttore esiste.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-settings"
          },
          "response": []
        },
        {
          "name": "Cambia gli interruttori",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/settings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "settings"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"medicalAnamnesisEnabled\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cambia gli interruttori che il titolare cambia da solo: anamnesi medica, tracciabilità, domande personalizzate (con il loro titolo), informativa privacy (strutture) e canale dei messaggi. Un interruttore che per questo account non esiste è 400.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-settings"
          },
          "response": []
        },
        {
          "name": "Moduli Agorà",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/agora",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "agora"
              ]
            },
            "description": "Restituisce i moduli Agorà di medicina estetica e dice quali sono attivi.\n\nPermesso: templates:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-agora"
          },
          "response": []
        },
        {
          "name": "Attiva un modulo Agorà",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/agora/:code/activate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "agora",
                ":code",
                "activate"
              ],
              "variable": [
                {
                  "key": "code",
                  "value": "agora-filler-ialuronico",
                  "description": "Codice del modulo Agorà, come compare in GET /agora."
                }
              ]
            },
            "description": "Attiva un modulo: nasce il modello `source: AGORA`, come dalla card della dashboard. Si può ripetere: se il modulo è già attivo risponde 200 con lo stesso modello e `idempotent: true`.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-agora-code-activate"
          },
          "response": []
        },
        {
          "name": "Disattiva un modulo Agorà",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/agora/:code/deactivate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "agora",
                ":code",
                "deactivate"
              ],
              "variable": [
                {
                  "key": "code",
                  "value": "agora-filler-ialuronico",
                  "description": "Codice del modulo Agorà, come compare in GET /agora."
                }
              ]
            },
            "description": "Disattiva un modulo: il modello si elimina, i consensi già inviati restano intatti.\n\nPermesso: configurations:write (delicato)\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-agora-code-deactivate"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Registri",
      "description": "Apparecchiature, lotti iniettabili, inchiostri, operatrici, motivi di consulto e domande personalizzate.",
      "item": [
        {
          "name": "Apparecchiature estetiche",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/equipment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "equipment"
              ]
            },
            "description": "Restituisce le apparecchiature elettromeccaniche del centro (D.M. 206/2015) con marca, modello, scheda ministeriale e ultima manutenzione.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-equipment"
          },
          "response": []
        },
        {
          "name": "Aggiungi un'apparecchiatura estetica",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/equipment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "equipment"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"brand\": \"Luxor\",\n  \"model\": \"IPL 3000\",\n  \"dmScheda\": \"Scheda 16c, luce pulsata\",\n  \"lastMaintenanceAt\": \"2026-06-01T00:00:00.000Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aggiunge un'apparecchiatura. Il registro ne tiene al massimo 30.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-equipment"
          },
          "response": []
        },
        {
          "name": "Modifica un'apparecchiatura estetica",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/equipment/:equipmentId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "equipment",
                ":equipmentId"
              ],
              "variable": [
                {
                  "key": "equipmentId",
                  "value": "8d9e0f1a-2b3c-4d4e-9f5a-6b7c8d9e0f1a",
                  "description": "Id dell'apparecchiatura."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lastMaintenanceAt\": \"2026-09-01T09:00:00Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Modifica un'apparecchiatura. Con `active` la riattivi o la disattivi.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-equipment-equipmentid"
          },
          "response": []
        },
        {
          "name": "Elimina un'apparecchiatura estetica",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/equipment/:equipmentId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "equipment",
                ":equipmentId"
              ],
              "variable": [
                {
                  "key": "equipmentId",
                  "value": "8d9e0f1a-2b3c-4d4e-9f5a-6b7c8d9e0f1a",
                  "description": "Id dell'apparecchiatura."
                }
              ]
            },
            "description": "Elimina l'apparecchiatura. Se compare in un consenso la disattiva invece di eliminarla, così la riga di conformità nei documenti firmati resta leggibile.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-equipment-equipmentid"
          },
          "response": []
        },
        {
          "name": "Apparecchiature MDR",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/medical-equipment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "medical-equipment"
              ]
            },
            "description": "Restituisce le apparecchiature MDR della medicina estetica. Il registro esiste quando sull'account è attiva la tracciabilità.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-medical-equipment"
          },
          "response": []
        },
        {
          "name": "Aggiungi un'apparecchiatura MDR",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/medical-equipment",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "medical-equipment"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"brand\": \"Fotona\",\n  \"model\": \"SP Dynamis\",\n  \"serialNumber\": \"FT-2231\",\n  \"ceMarking\": \"CE 0123\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aggiunge un'apparecchiatura MDR. Il registro ne tiene al massimo 30.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-medical-equipment"
          },
          "response": []
        },
        {
          "name": "Modifica un'apparecchiatura MDR",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/medical-equipment/:equipmentId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "medical-equipment",
                ":equipmentId"
              ],
              "variable": [
                {
                  "key": "equipmentId",
                  "value": "8d9e0f1a-2b3c-4d4e-9f5a-6b7c8d9e0f1a",
                  "description": "Id dell'apparecchiatura."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"notes\": \"Revisione annuale\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Modifica un'apparecchiatura MDR.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-medical-equipment-equipmentid"
          },
          "response": []
        },
        {
          "name": "Elimina un'apparecchiatura MDR",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/medical-equipment/:equipmentId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "medical-equipment",
                ":equipmentId"
              ],
              "variable": [
                {
                  "key": "equipmentId",
                  "value": "8d9e0f1a-2b3c-4d4e-9f5a-6b7c8d9e0f1a",
                  "description": "Id dell'apparecchiatura."
                }
              ]
            },
            "description": "Elimina l'apparecchiatura MDR. Se compare in un consenso la disattiva invece di eliminarla.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-medical-equipment-equipmentid"
          },
          "response": []
        },
        {
          "name": "Consensi senza lotto",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/lots/pending",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "lots",
                "pending"
              ]
            },
            "description": "Restituisce i consensi con iniettabili firmati negli ultimi 90 giorni che non hanno ancora un lotto registrato.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-lots-pending"
          },
          "response": []
        },
        {
          "name": "Configurazione del registro lotti",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/lots/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "lots",
                "config"
              ]
            },
            "description": "Restituisce i trattamenti iniettabili del catalogo, i tipi di prodotto e i prodotti già usati dall'account.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-lots-config"
          },
          "response": []
        },
        {
          "name": "Registro dei lotti iniettabili",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/lots",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "lots"
              ],
              "query": [
                {
                  "key": "search",
                  "value": "C1234",
                  "description": "Numero di lotto o nome del prodotto, anche parziale: è la ricerca per il richiamo. `lotNumber` è un sinonimo.",
                  "disabled": true
                },
                {
                  "key": "patientId",
                  "value": "",
                  "description": "Solo le registrazioni di quel paziente.",
                  "disabled": true
                },
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Solo quelle di quell'esecutore.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "2026-09-01",
                  "description": "Inizio del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30",
                  "description": "Fine del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Pagina, da 1; 50 righe per pagina.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce il registro dei lotti iniettabili: chi ha ricevuto quale lotto, quando e con quale esecutore. `search` serve per il richiamo di un lotto. Con la chiave Test il registro contiene solo i pazienti di prova (totale e pagine compresi).\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-lots"
          },
          "response": []
        },
        {
          "name": "Registra un lotto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/lots",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "lots"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"patientId\": \"8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e\",\n  \"treatmentCode\": \"est-botulino\",\n  \"productName\": \"Vistabel\",\n  \"productType\": \"TOSSINA\",\n  \"lotNumber\": \"C1234\",\n  \"expiryDate\": \"2027-05-31\",\n  \"quantity\": \"20 U\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Registra un lotto iniettabile. La registrazione finisce nel Registro attività.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-lots"
          },
          "response": []
        },
        {
          "name": "Correggi un lotto",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/lots/:lotId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "lots",
                ":lotId"
              ],
              "variable": [
                {
                  "key": "lotId",
                  "value": "9e0f1a2b-3c4d-4e5f-8a6b-7c8d9e0f1a2b",
                  "description": "Id della riga del registro lotti."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"lotNumber\": \"C1235\",\n  \"notes\": \"Numero di lotto corretto\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Corregge una registrazione del registro lotti, che finisce nel Registro attività. Paziente, consenso ed esecutore restano quelli di prima.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-lots-lotid"
          },
          "response": []
        },
        {
          "name": "Elimina un lotto",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/lots/:lotId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "lots",
                ":lotId"
              ],
              "variable": [
                {
                  "key": "lotId",
                  "value": "9e0f1a2b-3c4d-4e5f-8a6b-7c8d9e0f1a2b",
                  "description": "Id della riga del registro lotti."
                }
              ]
            },
            "description": "Elimina una registrazione del registro lotti. L'eliminazione finisce nel Registro attività.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-lots-lotid"
          },
          "response": []
        },
        {
          "name": "Lotti di un consenso",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/lots",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "lots"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "description": "Restituisce i lotti iniettabili e gli inchiostri registrati su un consenso, nel perimetro di sede della richiesta.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consents-id-lots"
          },
          "response": []
        },
        {
          "name": "Registra un lotto su un consenso",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consents/:id/lots",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consents",
                ":id",
                "lots"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "3f2a8c1e-5b7d-4e2a-9c41-7d8e2b6a1f09",
                  "description": "Id del consenso."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"treatmentCode\": \"est-botulino\",\n  \"productName\": \"Vistabel\",\n  \"productType\": \"TOSSINA\",\n  \"lotNumber\": \"C1234\",\n  \"quantity\": \"20 U\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Registra un lotto iniettabile sul consenso. Paziente e consenso li ricaviamo dal percorso; le altre regole sono quelle del registro lotti.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consents-id-lots"
          },
          "response": []
        },
        {
          "name": "Consensi senza inchiostro registrato",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inks/pending",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inks",
                "pending"
              ]
            },
            "description": "Restituisce i consensi con inchiostro firmati negli ultimi 90 giorni che non hanno ancora un lotto registrato.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-inks-pending"
          },
          "response": []
        },
        {
          "name": "Configurazione del registro inchiostri",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inks/config",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inks",
                "config"
              ]
            },
            "description": "Restituisce i trattamenti con inchiostro, i tipi di inchiostro e le marche già usate.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-inks-config"
          },
          "response": []
        },
        {
          "name": "Registro degli inchiostri",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inks"
              ],
              "query": [
                {
                  "key": "search",
                  "value": "C1234",
                  "description": "Numero di lotto o nome del prodotto, anche parziale: è la ricerca per il richiamo. `lotNumber` è un sinonimo.",
                  "disabled": true
                },
                {
                  "key": "patientId",
                  "value": "",
                  "description": "Solo le registrazioni di quel paziente.",
                  "disabled": true
                },
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Solo quelle di quell'esecutore.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "2026-09-01",
                  "description": "Inizio del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30",
                  "description": "Fine del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Pagina, da 1; 50 righe per pagina.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce il registro degli inchiostri e dei pigmenti (tatuaggi e PMU). Con la chiave Test contiene solo i pazienti di prova.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-inks"
          },
          "response": []
        },
        {
          "name": "Registra un inchiostro",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inks"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"patientId\": \"8b1d4f6a-2c3e-4a5b-9d7e-1f2a3b4c5d6e\",\n  \"treatmentCode\": \"tat-tatuaggio\",\n  \"brand\": \"Eternal\",\n  \"color\": \"Nero\",\n  \"lotNumber\": \"ET-77\",\n  \"reachCompliant\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Registra un lotto di inchiostro. La registrazione finisce nel Registro attività.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-inks"
          },
          "response": []
        },
        {
          "name": "Correggi un inchiostro",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inks/:inkId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inks",
                ":inkId"
              ],
              "variable": [
                {
                  "key": "inkId",
                  "value": "0f1a2b3c-4d5e-4f6a-9b7c-8d9e0f1a2b3c",
                  "description": "Id della riga del registro inchiostri."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"color\": \"Nero intenso\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Corregge una registrazione del registro inchiostri, che finisce nel Registro attività. Paziente, consenso ed esecutore restano quelli di prima.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-inks-inkid"
          },
          "response": []
        },
        {
          "name": "Elimina un inchiostro",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inks/:inkId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inks",
                ":inkId"
              ],
              "variable": [
                {
                  "key": "inkId",
                  "value": "0f1a2b3c-4d5e-4f6a-9b7c-8d9e0f1a2b3c",
                  "description": "Id della riga del registro inchiostri."
                }
              ]
            },
            "description": "Elimina una registrazione del registro inchiostri. L'eliminazione finisce nel Registro attività.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-inks-inkid"
          },
          "response": []
        },
        {
          "name": "Materiali della seduta",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/materials",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "materials"
              ],
              "query": [
                {
                  "key": "search",
                  "value": "C1234",
                  "description": "Numero di lotto o nome del prodotto, anche parziale: è la ricerca per il richiamo. `lotNumber` è un sinonimo.",
                  "disabled": true
                },
                {
                  "key": "patientId",
                  "value": "",
                  "description": "Solo le registrazioni di quel paziente.",
                  "disabled": true
                },
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Solo quelle di quell'esecutore.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "2026-09-01",
                  "description": "Inizio del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30",
                  "description": "Fine del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Pagina, da 1; 50 righe per pagina.",
                  "disabled": true
                },
                {
                  "key": "consentId",
                  "value": "",
                  "description": "Solo i materiali registrati su quel consenso.",
                  "disabled": true
                },
                {
                  "key": "kind",
                  "value": "NEEDLE",
                  "description": "Solo un tipo: NEEDLE, CARTRIDGE, GRIP, CAP, OINTMENT oppure OTHER.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce i materiali registrati nelle sedute di tatuaggio, PMU e piercing: aghi, cartucce, grip o manipoli, caps monouso, pomate e altri materiali, con marca, lotto, scadenza o ciclo di sterilizzazione. Gli inchiostri sono in `/inks`. Con la chiave Test contiene solo i pazienti di prova.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-materials"
          },
          "response": []
        },
        {
          "name": "I prodotti dello studio",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/supply-presets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "supply-presets"
              ],
              "query": [
                {
                  "key": "includeArchived",
                  "value": "false",
                  "description": "true per vedere anche i prodotti archiviati.",
                  "disabled": true
                },
                {
                  "key": "kind",
                  "value": "INK",
                  "description": "Solo un tipo: INK, NEEDLE, CARTRIDGE, GRIP, CAP, OINTMENT oppure OTHER.",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce la libreria «I miei prodotti» dello studio di tatuaggio: inchiostri e materiali salvati con il lotto attuale e la scadenza, nell'ordine scelto dallo studio. I prodotti archiviati si vedono solo con `includeArchived=true`.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-supply-presets"
          },
          "response": []
        },
        {
          "name": "Operatrici del centro",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/operators",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "operators"
              ]
            },
            "description": "Restituisce le operatrici del centro estetico che non hanno un accesso alla dashboard.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-operators"
          },
          "response": []
        },
        {
          "name": "Aggiungi un'operatrice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/operators",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "operators"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"firstName\": \"Olga\",\n  \"lastName\": \"Operatrice\",\n  \"qualification\": \"Estetista qualificata\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aggiunge un'operatrice. Il registro ne tiene al massimo 30.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-operators"
          },
          "response": []
        },
        {
          "name": "Modifica un'operatrice",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/operators/:operatorId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "operators",
                ":operatorId"
              ],
              "variable": [
                {
                  "key": "operatorId",
                  "value": "1a2b3c4d-5e6f-4a7b-8c8d-9e0f1a2b3c4d",
                  "description": "Id dell'operatrice."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"qualification\": \"Estetista qualificata\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Modifica un'operatrice. Con `active` la riattivi o la disattivi.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-operators-operatorid"
          },
          "response": []
        },
        {
          "name": "Elimina un'operatrice",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/operators/:operatorId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "operators",
                ":operatorId"
              ],
              "variable": [
                {
                  "key": "operatorId",
                  "value": "1a2b3c4d-5e6f-4a7b-8c8d-9e0f1a2b3c4d",
                  "description": "Id dell'operatrice."
                }
              ]
            },
            "description": "Elimina l'operatrice. Se compare in un consenso la disattiva invece di eliminarla.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-operators-operatorid"
          },
          "response": []
        },
        {
          "name": "Motivi di consulto",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consultation-reasons",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consultation-reasons"
              ]
            },
            "description": "Restituisce i motivi di consulto usati nelle visite, dal più usato.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-consultation-reasons"
          },
          "response": []
        },
        {
          "name": "Aggiungi un motivo di consulto",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consultation-reasons",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consultation-reasons"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Dolore lombare\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aggiunge un motivo di consulto. Un testo uguale a uno esistente, a parte maiuscole e spazi, è lo stesso motivo: ricevi quello che c'è già.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-consultation-reasons"
          },
          "response": []
        },
        {
          "name": "Rinomina un motivo di consulto",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consultation-reasons/:reasonId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consultation-reasons",
                ":reasonId"
              ],
              "variable": [
                {
                  "key": "reasonId",
                  "value": "2b3c4d5e-6f7a-4b8c-9d9e-0f1a2b3c4d5e",
                  "description": "Id del motivo di consulto."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Lombalgia\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Rinomina un motivo, anche nelle visite che lo usano.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#patch-consultation-reasons-reasonid"
          },
          "response": []
        },
        {
          "name": "Elimina un motivo di consulto",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/consultation-reasons/:reasonId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "consultation-reasons",
                ":reasonId"
              ],
              "variable": [
                {
                  "key": "reasonId",
                  "value": "2b3c4d5e-6f7a-4b8c-9d9e-0f1a2b3c4d5e",
                  "description": "Id del motivo di consulto."
                }
              ]
            },
            "description": "Elimina un motivo. Le visite che lo usavano restano intatte.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-consultation-reasons-reasonid"
          },
          "response": []
        },
        {
          "name": "Statistiche delle domande personalizzate",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/custom-questions/stats",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "custom-questions",
                "stats"
              ],
              "query": [
                {
                  "key": "sedeId",
                  "value": "",
                  "description": "Strutture: solo quella sede.",
                  "disabled": true
                },
                {
                  "key": "from",
                  "value": "2026-09-01",
                  "description": "Inizio del periodo (AAAA-MM-GG).",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30",
                  "description": "Fine del periodo (AAAA-MM-GG).",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce i totali delle risposte per ogni domanda attiva. Le risposte a testo libero non vengono mostrate.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-custom-questions-stats"
          },
          "response": []
        },
        {
          "name": "Riordina le domande personalizzate",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/custom-questions/reorder",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "custom-questions",
                "reorder"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Riordina le domande: passa in `ids` gli id nell'ordine che vuoi.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-custom-questions-reorder"
          },
          "response": []
        },
        {
          "name": "Domande personalizzate",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/custom-questions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "custom-questions"
              ]
            },
            "description": "Restituisce le domande personalizzate dell'anamnesi delle strutture «Associazione», in ordine e comprese quelle disattivate.\n\nPermesso: registries:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-custom-questions"
          },
          "response": []
        },
        {
          "name": "Aggiungi una domanda personalizzata",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Facoltativa: protegge dai doppioni se ripeti la richiesta.",
                "disabled": true
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/custom-questions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "custom-questions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Come ci hai conosciuto?\",\n  \"type\": \"MULTIPLE_CHOICE\",\n  \"options\": [\n    {\n      \"label\": \"Passaparola\"\n    },\n    {\n      \"label\": \"Internet\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Aggiunge una domanda. Le domande attive possono essere al massimo 20.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-custom-questions"
          },
          "response": []
        },
        {
          "name": "Sostituisci una domanda personalizzata",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/custom-questions/:questionId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "custom-questions",
                ":questionId"
              ],
              "variable": [
                {
                  "key": "questionId",
                  "value": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
                  "description": "Id della domanda personalizzata."
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Hai già fatto sedute simili?\",\n  \"type\": \"YES_NO\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sostituisce la domanda intera, come il salvataggio della dashboard.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#put-custom-questions-questionid"
          },
          "response": []
        },
        {
          "name": "Elimina una domanda personalizzata",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/custom-questions/:questionId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "custom-questions",
                ":questionId"
              ],
              "variable": [
                {
                  "key": "questionId",
                  "value": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
                  "description": "Id della domanda personalizzata."
                }
              ]
            },
            "description": "Elimina la domanda. Se ha già delle risposte la disattiva invece di eliminarla, così le risposte passate restano leggibili.\n\nPermesso: registries:write\n\nRiferimento: https://consensosicuro.it/integrazioni/api#delete-custom-questions-questionid"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Consumi",
      "description": "Quota, messaggi e statistiche.",
      "item": [
        {
          "name": "Quota e consumi",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/account/usage",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "account",
                "usage"
              ]
            },
            "description": "Restituisce la quota del periodo (la stessa che decide se un invio passa), il piano, il pacchetto prepagato o extra, i messaggi WhatsApp e SMS del periodo e i consumi degli ultimi 12 mesi. I consensi di prova e quelli annullati non contano.\n\nPermesso: account:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-account-usage"
          },
          "response": []
        },
        {
          "name": "Statistiche",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/account/stats",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "account",
                "stats"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "2026-09-01",
                  "description": "Inizio del periodo: una data (AAAA-MM-GG) o un istante ISO 8601.",
                  "disabled": true
                },
                {
                  "key": "to",
                  "value": "2026-09-30",
                  "description": "Fine del periodo, compresa: una data (AAAA-MM-GG) o un istante ISO 8601.",
                  "disabled": true
                },
                {
                  "key": "sedeId",
                  "value": "",
                  "description": "Strutture: solo quella sede (di questo account, altrimenti 404). In conflitto con X-Structure-Sede-Id è 403.",
                  "disabled": true
                },
                {
                  "key": "memberId",
                  "value": "",
                  "description": "Strutture: solo quel professionista (di questo account, altrimenti 404).",
                  "disabled": true
                }
              ]
            },
            "description": "Restituisce le statistiche della dashboard (consensi per stato, andamento, trattamenti) con gli stessi filtri.\n\nPermesso: account:read\n\nRiferimento: https://consensosicuro.it/integrazioni/api#get-account-stats"
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhook",
      "description": "La prova del webhook configurato in dashboard.",
      "item": [
        {
          "name": "Prova il webhook",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Structure-Sede-Id",
                "value": "",
                "description": "Strutture: la sede su cui lavorare.",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/webhooks/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "webhooks",
                "test"
              ]
            },
            "description": "Invia un evento `ping` firmato all'indirizzo del webhook configurato in dashboard. Serve a verificare che il tuo server riceva e controlli la firma prima di aspettare un consenso vero.\n\nPermesso: webhooks:test\n\nRiferimento: https://consensosicuro.it/integrazioni/api#post-webhooks-test"
          },
          "response": []
        }
      ]
    }
  ]
}
