{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/it/products/namirialsignenterprise/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Creare un modello e inviare una pratica a partire da esso","description":"Integration and usage documentation."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"creare-un-modello-e-inviare-una-pratica-a-partire-da-esso","__idx":0},"children":["Creare un modello e inviare una pratica a partire da esso"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["I modelli consentono di definire un workflow di firma riutilizzabile — documento, stage, destinatari e posizionamento dei campi — e di generare pratiche a partire da esso all'occorrenza. Questa guida illustra l'intera configurazione di un modello e mostra come creare una pratica a partire da esso."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisiti","__idx":1},"children":["Prerequisiti"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JWT Bearer token"]}," valido oppure un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Personal Access Token"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["L'",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ID organizzazione"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["organizationId"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Un documento pronto per il caricamento"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"parte-1--creare-il-modello","__idx":2},"children":["Parte 1 — Creare il modello"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-1--creare-un-modello","__idx":3},"children":["Passaggio 1 — Creare un modello"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creare il contenitore del modello. Assegnare un nome per poterlo identificare successivamente. Facoltativamente è possibile impostare anche la scadenza."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /api/v1/organizations/{organizationId}/templates\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"name\": \"Standard Lease Agreement\",\n  \"expiration\": {\n    \"expiresAt\": \"2026-04-25T09:16:24.350Z\",\n    \"mode\": \"absolute\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201 Created"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"f7e6d5c4-1234-1234-1234-ba9876543210\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Salvare l'",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," restituito: è il ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateId"]}," da utilizzare in tutte le chiamate successive di questa sezione."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-2--caricare-un-documento-nel-modello","__idx":4},"children":["Passaggio 2 — Caricare un documento nel modello"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Allegare il PDF che i firmatari riceveranno. Questo endpoint utilizza ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["multipart/form-data"]},", non JSON."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /api/v1/organizations/{organizationId}/templates/{templateId}/files\nContent-Type: multipart/form-data\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Descrizione"},"children":["Descrizione"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["binary"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Il file PDF da allegare"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201 Created"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"9c8b7a69-1234-1234-1234-987654321000\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Salvare l'",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," restituito: è il ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileId"]},", utilizzato per il posizionamento dei campi Firma."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-3--aggiungere-uno-stage-di-firma-al-modello","__idx":5},"children":["Passaggio 3 — Aggiungere uno stage di firma al modello"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Uno stage rappresenta un passaggio del workflow. I destinatari appartenenti allo stesso stage firmano in parallelo; gli stage vengono eseguiti in sequenza."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /api/v1/organizations/{organizationId}/templates/{templateId}/stages\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"name\": \"First\",\n  \"requiredRecipientCompletions\": 1,\n  \"type\": \"signer\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201 Created"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"b2a1f0e9-1234-1234-1234-726150403020\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Salvare l'",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," restituito: è lo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stageId"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-4--aggiungere-un-destinatario-allo-stage","__idx":6},"children":["Passaggio 4 — Aggiungere un destinatario allo stage"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aggiungere un destinatario allo stage. In un modello il destinatario rappresenta tipicamente un ruolo: i dati di contatto effettivi possono essere sovrascritti al momento della creazione di una pratica a partire dal modello."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /api/v1/organizations/{organizationId}/templates/{templateId}/stages/{stageId}/recipients\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"givenName\": \"John\",\n  \"surname\": \"Doe\",\n  \"email\": \"john.doe@sample.com\",\n  \"notificationChannels\": [\n    \"email\"\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201 Created"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"1a2b3c4d-1234-1234-1234-ef0123456789\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Salvare l'",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," restituito: è il ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recipientId"]},", utilizzato per il posizionamento del campo Firma."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-5--posizionare-un-campo-firma","__idx":7},"children":["Passaggio 5 — Posizionare un campo Firma"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Definire dove deve comparire la firma e assegnarla al destinatario. Questa chiamata sostituisce completamente tutti i task relativi ai campi del file, pertanto è necessario inviare ogni volta l'elenco completo."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PUT /api/v1/organizations/{organizationId}/templates/{templateId}/files/{fileId}/tasks\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"tasks\": [\n    {\n      \"field\": {\n        \"fieldType\": \"Signature\",\n        \"id\": \"field-001\",\n        \"page\": 1,\n        \"positionX\": 100,\n        \"positionY\": 650,\n        \"width\": 200,\n        \"height\": 60,\n        \"allowedSignatureTypes\": [\n          { \"signatureType\": \"ClickToSignSignature\" },\n          { \"signatureType\": \"DrawToSignSignature\" }\n        ]\n      },\n      \"recipientId\": \"1a2b3c4d-1234-1234-1234-ef0123456789\",\n      \"sortOrder\": 1\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["positionX"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["positionY"]}," sono le coordinate dell'angolo superiore sinistro del campo sulla pagina."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedSignatureTypes"]}," determina quali metodi di firma il destinatario può scegliere. Se si lascia il valore ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", si applicano le impostazioni predefinite dell'organizzazione."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sortOrder"]}," definisce la sequenza con cui i campi vengono presentati al firmatario."," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["204 No Content"]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["La configurazione del modello è ora completa."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"parte-2--creare-una-pratica-dal-modello","__idx":8},"children":["Parte 2 — Creare una pratica dal modello"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-6--creare-una-pratica","__idx":9},"children":["Passaggio 6 — Creare una pratica"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["È possibile istanziare una nuova pratica dal modello con una singola chiamata. Il documento, gli stage, i destinatari e il posizionamento dei campi del modello vengono copiati automaticamente nella nuova pratica. Non è richiesto alcun corpo della richiesta."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /api/v1/organizations/{organizationId}/templates/{templateId}/create-envelope\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"createdEnvelopeId\": \"a1b2c3d4-1234-1234-1234-ef1234567890\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Il valore ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdEnvelopeId"]}," restituito è un normale ID di pratica. Da questo momento è possibile lavorare con la pratica come con qualsiasi altra: facoltativamente si può modificarla prima dell'invio oppure inviarla immediatamente."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-7--inviare-la-pratica","__idx":10},"children":["Passaggio 7 — Inviare la pratica"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Portare la pratica da ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["draft"]}," a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sent"]},". Questa operazione attiva l'e-mail di invito al destinatario."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /api/v1/organizations/{organizationId}/envelopes/{envelopeId}/send\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Non è richiesto alcun corpo della richiesta. Utilizzare ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdEnvelopeId"]}," come ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["envelopeId"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"a1b2c3d4-1234-1234-1234-ef1234567890\",\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-8--verificare-lo-stato-della-pratica","__idx":11},"children":["Passaggio 8 — Verificare lo stato della pratica"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["È possibile interrogare periodicamente questo endpoint per monitorare l'avanzamento."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /api/v1/organizations/{organizationId}/envelopes/{envelopeId}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Risposta ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"a1b2c3d4-1234-1234-1234-ef1234567890\",\n  \"name\": \"Standard Lease Agreement\",\n  \"status\": \"completed\",\n  \"sentAt\": \"2026-04-20T10:05:00Z\"\n  ...\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passaggio-9--scaricare-il-documento-firmato","__idx":12},"children":["Passaggio 9 — Scaricare il documento firmato"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Quando la pratica è ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]},", è possibile recuperare il file firmato e l'audit trail."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Elencare gli artifact disponibili:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /api/v1/organizations/{organizationId}/envelopes/{envelopeId}/artifacts\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"artifacts\": [\n    {\n      \"id\": \"0a9e87c0-1234-1234-1234-99c8c87a9a33\",\n      \"name\": \"LeaseAgreement_signed.pdf\",\n      \"type\": \"CompletedFile\"\n    },\n    {\n      \"id\": \"1b8f76b1-1234-1234-1234-aada9b8bab44\",\n      \"name\": \"AuditTrail.pdf\",\n      \"type\": \"AuditTrail\"\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scaricare un artifact specifico:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /api/v1/organizations/{organizationId}/envelopes/{envelopeId}/artifacts/{artifactId}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Restituisce il file come flusso binario (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/pdf"]},")."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"Creare un modello e inviare una pratica a partire da esso","id":"creare-un-modello-e-inviare-una-pratica-a-partire-da-esso","depth":1},{"value":"Prerequisiti","id":"prerequisiti","depth":2},{"value":"Parte 1 — Creare il modello","id":"parte-1--creare-il-modello","depth":2},{"value":"Passaggio 1 — Creare un modello","id":"passaggio-1--creare-un-modello","depth":3},{"value":"Passaggio 2 — Caricare un documento nel modello","id":"passaggio-2--caricare-un-documento-nel-modello","depth":3},{"value":"Passaggio 3 — Aggiungere uno stage di firma al modello","id":"passaggio-3--aggiungere-uno-stage-di-firma-al-modello","depth":3},{"value":"Passaggio 4 — Aggiungere un destinatario allo stage","id":"passaggio-4--aggiungere-un-destinatario-allo-stage","depth":3},{"value":"Passaggio 5 — Posizionare un campo Firma","id":"passaggio-5--posizionare-un-campo-firma","depth":3},{"value":"Parte 2 — Creare una pratica dal modello","id":"parte-2--creare-una-pratica-dal-modello","depth":2},{"value":"Passaggio 6 — Creare una pratica","id":"passaggio-6--creare-una-pratica","depth":3},{"value":"Passaggio 7 — Inviare la pratica","id":"passaggio-7--inviare-la-pratica","depth":3},{"value":"Passaggio 8 — Verificare lo stato della pratica","id":"passaggio-8--verificare-lo-stato-della-pratica","depth":3},{"value":"Passaggio 9 — Scaricare il documento firmato","id":"passaggio-9--scaricare-il-documento-firmato","depth":3}],"frontmatter":{"seo":{"title":"Creare un modello e inviare una pratica a partire da esso"}},"lastModified":"2026-09-21T14:47:50.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/it/products/namirialsignenterprise/namirialsignenterprise-knowledge-center/03-developer-documentation/01-api-reference/basic-template-workflow","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}