eSignature Integration with Python: KAiZEN Tutorial

Artikel delen

blogafbeelding

Manual document signing slows down your operations, introduces errors, and compromises security. If you’re using Python to power your applications, integrating an eSignature API like KAiZEN can eliminate these challenges. With just a few API calls, you can send documents, request signatures, and verify status—all programmatically.

This blog will guide you through the process of integrating KAiZEN’s eSignature API with Python, enabling a more efficient and automated document workflow.

How to integrate eSignature into Python Applications:

Stap 1:

Begin by listing the individuals who need to sign the document and determining the sequence of their signatures. KAiZEN allows for sequential signing, ensuring signers follow the order you define.

For Example:

Gegevens van de ondertekenaar
Naam ondertekenaar Bestellen E-mailadres van de ondertekenaar
Ondertekenaar 1 1 signer1@gmail.com
Ondertekenaar 2 2 signer2@gmail.com
  1. Stap 2:

    You’ll need to initiate a secure HTTP POST request to the KAiZEN “Initiate Sign API” with the following parameters:

    HTTP Call Details
    Naam van de parameter Waarde
    Content-Type application/json
    Werkwijze POST
    Eindpunt https://fa-kaizen-prod.azurewebsites.net/api/Sign/RequestStr?code=RTa1A0GW5Yl92OF54-73lRqglLFCt_0pVcg86hWf1EjtAzFuNROcdA==
    Hoofdtekst JSON-body met parameters
    Key Parameters for the Request Body
    Naam van de parameter Beschrijving Vereist?
    docContent Base64-inhoud voor het PDF-bestand Ja
    docNaam Naam van het bestand Ja
    appToken Unieke code om het verzoek in gang te zetten Ja
    e-mailadres van de aanvrager E-mailadres van de persoon die het verzoek indient Ja
    naam van de aanvrager Naam van de persoon die het verzoek indient Ja
    beschrijving Beschrijft het document NEE
    ondertekenaars Een array met de ondertekenaars die het document in de vooraf bepaalde volgorde moeten ondertekenen. Ja
    CallBackURL CallbackURL geeft de URL aan waarnaar KAiZEN een reactie moet sturen zodra alle ondertekenaars het document hebben ondertekend. Dit kan de URL van een webservice van Salesforce zijn of een willekeurige externe pagina.

    Bijvoorbeeld: https://duumy.my.salesforce-sites.com/services/apexrest/KaizenCallbackURL/
    Nee
    nieuwVerzoekE-mailOnderwerp Beschrijft het onderwerp van de e-mail Nee
    bericht van de aanvrager Beschrijft het invoerveld voor elektronische handtekeningen Nee
    docBeschrijving Beschrijft het document Nee
  2. Stap 3:

    Python Code Sample for Integration

    							
    import http.client
    import json
    
    conn = http.client.HTTPSConnection("fa-kaizen-staging.azurewebsites.net")
    payload = json.dumps({
      "docContent": "<>",
      "requesterEmail": "xyz@gmail.com",
      "requesterName": "XYZ",
      "requesterPhone": "xxxxx-xxx-xxxx",
      "description": "",
      "newRequestEmailSubject": "You have a document to sign",
      "requesterMessage": "Kindly eSign your KAiZEN Test PDF",
      "signers": [
        {
          "signerEmail": "signer1@gmail.com",
          "signerName": "Signer1",
          "signerPhone": "xx-xxx-xxxx-xxx",
          "order": "1",
          "signerRole": "signer"
        },
        {
          "signerEmail": "signer2@gmail.com",
          "signerName": "Signer2",
          "signerPhone": "xxx-xxx-xxxx-xxxx",
          "order": "2",
          "signerRole": "reviewer"
        }
      ],
      "docDescription": "Base 64 string based test doc",
      "callbackurl": ""
    })
    headers = {
      'Content-Type': 'application/json'
    }
    conn.request("POST", "/api/Sign/RequestStr?code=mLgEBTpi9dfooQ6TB9gc7sa4qiIuuxmqQYoTx8nQQ1StAzFu93g06A==", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    
    							
    						
    Sample API Response:
    							
    								{
    “FailRules”: [],
    “Data”: {
    “SignRequestId”: “01HV6MEARQD3X8ZXXX5FR3YDB8”,
    “RequestNo”: “KAiZEN-118”
    }
    }
    							
    						

    Once the request is accepted, a unique request ID is returned. If a callback URL is provided, a signed PDF will be sent to the specified endpoint after all signers have completed their actions.

    What Happens After the API Call?

    Each signer receives an email notification to begin signing, following the pre-defined order. The signing flow is intuitive and secure.

How the KAiZEN Signing Workflow Operates

  1. Check Email Inbox

    Each signer receives an email from KAiZEN with a link to sign.

    Hoe voeg je een digitale handtekening toe aan Salesforce-documenten?
  2. Click to Begin

    The email contains a secure link labeled “Sign Here” which opens the KAiZEN signing editor.

    Screenshot 12 april 2024 om 11:41:12
  3. Onderteken het document

    Nadat u op de knop ‘Hier ondertekenen’ hebt geklikt, verschijnt er een pop-upvenster waarin u uit de volgende methoden kunt kiezen om digitaal te ondertekenen:

    • Initialen
    • Zet je handtekening
    • Upload een afbeelding van uw handtekening
    • Onlangs bekeken borden
    stap 2b
  4. Verzenden en klaar

    Zodra u uw handtekening hebt geplaatst, klikt u op ‘Verzenden’. De volgende ondertekenaar in de volgorde ontvangt dan een melding.

    handtekeningcommentaar geschaald
  5. Nadat alle ondertekenaars klaar zijn

    Zodra alle ondertekenaars het proces hebben doorlopen:

    • Elke ondertekenaar ontvangt een e-mail met het definitieve, ondertekende document.
    • Als er een callback-URL is geconfigureerd, wordt er automatisch een kopie van het ondertekende document naar dat systeem verzonden (bijvoorbeeld Java of uw applicatie).
    Screenshot 12 april 2024 om 11:53:14

Conclusie

Integrating KAiZEN’s eSignature API with Python allows you to build robust digital signing workflows that are secure, scalable, and easy to manage. Whether you’re handling contracts, approvals, or forms, this integration empowers your Python applications with seamless automation and real-time status tracking.

Ready to transform your document signing process? Start integrating with KAiZEN and bring smarter eSignatures to your Python applications today.

blogafbeelding

Manual document signing slows down your operations, introduces errors, and compromises security. If you’re using Python to power your applications, integrating an eSignature API like KAiZEN can eliminate these challenges. With just a few API calls, you can send documents, request signatures, and verify status—all programmatically.

This blog will guide you through the process of integrating KAiZEN’s eSignature API with Python, enabling a more efficient and automated document workflow.

How to integrate eSignature into Python Applications:

Stap 1:

Begin by listing the individuals who need to sign the document and determining the sequence of their signatures. KAiZEN allows for sequential signing, ensuring signers follow the order you define.

For Example:

Gegevens van de ondertekenaar
Naam ondertekenaar Bestellen E-mailadres van de ondertekenaar
Ondertekenaar 1 1 signer1@gmail.com
Ondertekenaar 2 2 signer2@gmail.com
  1. Stap 2:

    You’ll need to initiate a secure HTTP POST request to the KAiZEN “Initiate Sign API” with the following parameters:

    HTTP Call Details
    Naam van de parameter Waarde
    Content-Type application/json
    Werkwijze POST
    Eindpunt https://fa-kaizen-prod.azurewebsites.net/api/Sign/RequestStr?code=RTa1A0GW5Yl92OF54-73lRqglLFCt_0pVcg86hWf1EjtAzFuNROcdA==
    Hoofdtekst JSON-body met parameters
    Key Parameters for the Request Body
    Naam van de parameter Beschrijving Vereist?
    docContent Base64-inhoud voor het PDF-bestand Ja
    docNaam Naam van het bestand Ja
    appToken Unieke code om het verzoek in gang te zetten Ja
    e-mailadres van de aanvrager E-mailadres van de persoon die het verzoek indient Ja
    naam van de aanvrager Naam van de persoon die het verzoek indient Ja
    beschrijving Beschrijft het document NEE
    ondertekenaars Een array met de ondertekenaars die het document in de vooraf bepaalde volgorde moeten ondertekenen. Ja
    CallBackURL CallbackURL geeft de URL aan waarnaar KAiZEN een reactie moet sturen zodra alle ondertekenaars het document hebben ondertekend. Dit kan de URL van een webservice van Salesforce zijn of een willekeurige externe pagina.

    Bijvoorbeeld: https://duumy.my.salesforce-sites.com/services/apexrest/KaizenCallbackURL/
    Nee
    nieuwVerzoekE-mailOnderwerp Beschrijft het onderwerp van de e-mail Nee
    bericht van de aanvrager Beschrijft het invoerveld voor elektronische handtekeningen Nee
    docBeschrijving Beschrijft het document Nee
  2. Stap 3:

    Python Code Sample for Integration

    							
    import http.client
    import json
    
    conn = http.client.HTTPSConnection("fa-kaizen-staging.azurewebsites.net")
    payload = json.dumps({
      "docContent": "<>",
      "requesterEmail": "xyz@gmail.com",
      "requesterName": "XYZ",
      "requesterPhone": "xxxxx-xxx-xxxx",
      "description": "",
      "newRequestEmailSubject": "You have a document to sign",
      "requesterMessage": "Kindly eSign your KAiZEN Test PDF",
      "signers": [
        {
          "signerEmail": "signer1@gmail.com",
          "signerName": "Signer1",
          "signerPhone": "xx-xxx-xxxx-xxx",
          "order": "1",
          "signerRole": "signer"
        },
        {
          "signerEmail": "signer2@gmail.com",
          "signerName": "Signer2",
          "signerPhone": "xxx-xxx-xxxx-xxxx",
          "order": "2",
          "signerRole": "reviewer"
        }
      ],
      "docDescription": "Base 64 string based test doc",
      "callbackurl": ""
    })
    headers = {
      'Content-Type': 'application/json'
    }
    conn.request("POST", "/api/Sign/RequestStr?code=mLgEBTpi9dfooQ6TB9gc7sa4qiIuuxmqQYoTx8nQQ1StAzFu93g06A==", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
    
    							
    						
    Sample API Response:
    							
    								{
    “FailRules”: [],
    “Data”: {
    “SignRequestId”: “01HV6MEARQD3X8ZXXX5FR3YDB8”,
    “RequestNo”: “KAiZEN-118”
    }
    }
    							
    						

    Once the request is accepted, a unique request ID is returned. If a callback URL is provided, a signed PDF will be sent to the specified endpoint after all signers have completed their actions.

    What Happens After the API Call?

    Each signer receives an email notification to begin signing, following the pre-defined order. The signing flow is intuitive and secure.

How the KAiZEN Signing Workflow Operates

  1. Check Email Inbox

    Each signer receives an email from KAiZEN with a link to sign.

    Hoe voeg je een digitale handtekening toe aan Salesforce-documenten?
  2. Click to Begin

    The email contains a secure link labeled “Sign Here” which opens the KAiZEN signing editor.

    Screenshot 12 april 2024 om 11:41:12
  3. Onderteken het document

    Nadat u op de knop ‘Hier ondertekenen’ hebt geklikt, verschijnt er een pop-upvenster waarin u uit de volgende methoden kunt kiezen om digitaal te ondertekenen:

    • Initialen
    • Zet je handtekening
    • Upload een afbeelding van uw handtekening
    • Onlangs bekeken borden
    stap 2b
  4. Verzenden en klaar

    Zodra u uw handtekening hebt geplaatst, klikt u op ‘Verzenden’. De volgende ondertekenaar in de volgorde ontvangt dan een melding.

    handtekeningcommentaar geschaald
  5. Nadat alle ondertekenaars klaar zijn

    Zodra alle ondertekenaars het proces hebben doorlopen:

    • Elke ondertekenaar ontvangt een e-mail met het definitieve, ondertekende document.
    • Als er een callback-URL is geconfigureerd, wordt er automatisch een kopie van het ondertekende document naar dat systeem verzonden (bijvoorbeeld Java of uw applicatie).
    Screenshot 12 april 2024 om 11:53:14

Conclusie

Integrating KAiZEN’s eSignature API with Python allows you to build robust digital signing workflows that are secure, scalable, and easy to manage. Whether you’re handling contracts, approvals, or forms, this integration empowers your Python applications with seamless automation and real-time status tracking.

Ready to transform your document signing process? Start integrating with KAiZEN and bring smarter eSignatures to your Python applications today.

Meld je vandaag nog aan voor een gratis proefperiode v
!

Probeer KAiZEN gratis

Heb je een vraag? Wij staan 24 uur per dag, 7 dagen per week voor je klaar

Naar boven scrollen