Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [v2.0.0rc1] - WebForms API v1.1.0-1.0.4 - 2024-09-24
### Changed
- Added support for version v1.1.0-1.0.4 of the DocuSign WebForms API.
- Updated the SDK release version.

## Important Action Required
- User needs to update the base URL in your codebase (if passing to SDK explicitly) and remove the /v1.1 component at the end of the URL for the SDK to work properly with this release.

## [v1.0.0] - WebForms API v1.1.0-1.0.2 - 2024-02-14
## Version 1.0.0 (Initial Release)
- Introducing the SDK based on the OpenAPI specification of DocuSign WebForms APIs.
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exclude test/*
255 changes: 127 additions & 128 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,128 +1,127 @@
# docusign-webforms
The Web Forms API facilitates generating semantic HTML forms around everyday contracts.

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.1.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen
For more information, please visit [https://developers.docusign.com/](https://developers.docusign.com/)

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import docusign_webforms
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import docusign_webforms
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import docusign_webforms
from docusign_webforms.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: docusignAccessCode
configuration = docusign_webforms.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = docusign_webforms.FormInstanceManagementApi(docusign_webforms.ApiClient(configuration))
account_id = 'account_id_example' # str | Account identifier in which the web form resides
form_id = 'form_id_example' # str | Unique identifier for a web form entity that is consistent for it's lifetime
create_instance_body = docusign_webforms.CreateInstanceRequestBody() # CreateInstanceRequestBody | Request body containing properties that will be used to create instance.

try:
# Creates an instance of the web form
api_response = api_instance.create_instance(account_id, form_id, create_instance_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FormInstanceManagementApi->create_instance: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://www.docusign.net/webforms/v1.1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FormInstanceManagementApi* | [**create_instance**](docs/FormInstanceManagementApi.md#create_instance) | **POST** /accounts/{account_id}/forms/{form_id}/instances | Creates an instance of the web form
*FormInstanceManagementApi* | [**get_instance**](docs/FormInstanceManagementApi.md#get_instance) | **GET** /accounts/{account_id}/forms/{form_id}/instances/{instance_id} | Get form instance
*FormInstanceManagementApi* | [**list_instances**](docs/FormInstanceManagementApi.md#list_instances) | **GET** /accounts/{account_id}/forms/{form_id}/instances | List instances
*FormInstanceManagementApi* | [**refresh_token**](docs/FormInstanceManagementApi.md#refresh_token) | **POST** /accounts/{account_id}/forms/{form_id}/instances/{instance_id}/refresh | Refreshes the instance token
*FormManagementApi* | [**get_form**](docs/FormManagementApi.md#get_form) | **GET** /accounts/{account_id}/forms/{form_id} | Get Form
*FormManagementApi* | [**list_forms**](docs/FormManagementApi.md#list_forms) | **GET** /accounts/{account_id}/forms | List Forms


## Documentation For Models

- [AuthenticationMethod](docs/AuthenticationMethod.md)
- [CreateInstanceRequestBody](docs/CreateInstanceRequestBody.md)
- [HttpError](docs/HttpError.md)
- [HttpSuccess](docs/HttpSuccess.md)
- [InstanceSource](docs/InstanceSource.md)
- [InstanceStatus](docs/InstanceStatus.md)
- [TemplateProperties](docs/TemplateProperties.md)
- [WebForm](docs/WebForm.md)
- [WebFormComponentType](docs/WebFormComponentType.md)
- [WebFormContent](docs/WebFormContent.md)
- [WebFormInstance](docs/WebFormInstance.md)
- [WebFormInstanceEnvelopes](docs/WebFormInstanceEnvelopes.md)
- [WebFormInstanceList](docs/WebFormInstanceList.md)
- [WebFormInstanceMetadata](docs/WebFormInstanceMetadata.md)
- [WebFormMetadata](docs/WebFormMetadata.md)
- [WebFormProperties](docs/WebFormProperties.md)
- [WebFormSource](docs/WebFormSource.md)
- [WebFormState](docs/WebFormState.md)
- [WebFormSummary](docs/WebFormSummary.md)
- [WebFormSummaryList](docs/WebFormSummaryList.md)
- [WebFormUserInfo](docs/WebFormUserInfo.md)
- [WebFormValues](docs/WebFormValues.md)


## Documentation For Authorization


## docusignAccessCode

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://account.docusign.com/oauth/auth
- **Scopes**: N/A


## Author

devcenter@docusign.com

# The Official Docusign WebForms Python Client SDK

[![PyPI version][pypi-image]][pypi-url]
<!--[![PyPI downloads][downloads-image]][downloads-url]-->

The Docusign SDK makes integrating Docusign into your apps and websites a seamless experience.

## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
* [Version Information](#versionInformation)
* [Requirements](#requirements)
* [Compatibility](#compatibility)
* [Path setup](#pathSetup)
* [Install via PIP](#pip)
- [Dependencies](#dependencies)
- [API Reference](#apiReference)
- [Code Examples](#codeExamples)
- [OAuth Implementations](#oauthImplementations)
- [Changelog](#changeLog)
- [Support](#support)
- [License](#license)
- [Additional Resources](#additionalResources)

<a id="introduction"></a>
## Introduction
Leverage the power of Web Forms in your agreement processes. Enjoy greater flexibility to manage forms using your own code including the creation and management of form instances with prefilled data. This API works with Docusign JS to enable the embedding of a web form instance in your web application.

<a id="installation"></a>
## Installation
This client SDK is provided as open source, which enables you to customize its functionality to suit your particular use case. To do so, download or clone the repository. If the SDK’s given functionality meets your integration needs, or if you’re working through our [code examples](https://developers.docusign.com/docs/web-forms-api/how-to/) from the [Docusign Developer Center](https://developers.docusign.com/), you merely need to install it by following the instructions below.

<a id="versionInformation"></a>
### Version Information
- **API version**: 1.1.0
- **Latest SDK version**: 2.0.0rc1

<a id="requirements"></a>
## Requirements
* Python 2.7 (3.7+ recommended)
* Free [developer account](https://go.docusign.com/o/sandbox/?postActivateUrl=https://developers.docusign.com/)

<a id="compatibility"></a>
## Compatibility
* Python 2.7+

<a id="pathSetup"></a>
### Path setup:
1. Locate your Python installation, also referred to as a **site-packages** folder. This folder is usually labeled in a format of **Python{VersionNumber}**.
**Examples:**
* Unix/Linux: **/usr/lib/python2.7**
* Mac: **/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7**
* Windows: **C:\Users\{username}\AppData\Local\Programs\Python\Python37**
2. Add your Python folder’s path to your system as an environment variable.
**Unix/Linux:**
1. Type the following command into your console: \
**export PYTHONPATH = "${PYTHONPATH}:.:/_path_/_to_/_site-packages_"**
2. Optionally, you can add this command to your system profile, which will run the command each time Python is launched.

**Windows:**
<ol>
<li>Open the Windows <strong>Control Panel.</strong></li>
<li>Under the System and Security category, open the <strong>System</strong> information panel.</li>
<li>Select <strong>Advanced System Settings</strong> to open the <strong>System Properties</strong> dialog box.</li>
<li>On the <strong>Advanced</strong> tab, select the <strong>Environment Variables</strong> button at the lower-right corner.
<ol style="list-style-type: lower-alpha">
<li>Check to see whether <strong>PYTHONPATH</strong> has been added as a <strong>system variable.</strong></li>
<li>If it has not, select <strong>New</strong> to add it. The variable you add is the path to the <strong>site-packages</strong> folder.</li>
</ol>
</li>
</ol>


**Note:** If you are still unable to reference Python or pip via your command console, you can also add the path to the **site-packages** folder to the built-in environment variable labeled **Path**, which will take effect the next time you start your machine.

<a id="pip"></a>
### Install via PIP:
In your command console, type: **pip install docusign_webforms**
**Note:** This may require the command console to be elevated. You can accomplish this via sudo in Unix/Linux, or by running the command console as an administrator in Windows.

<a id="dependencies"></a>
## SDK Dependencies
This client has the following external dependencies:
* certifi v14.05.14+
* six v1.8.0+
* python_dateutil v2.5.3+
* setuptools v21.0.0+
* urllib3 v1.15.1+
* PyJWT v2.0.0+
* cryptography v2.5+

<a id="apiReference"></a>
## API Reference
You can refer to the API reference [here](https://developers.docusign.com/docs/web-forms-api/reference/).

<a id="codeExamples"></a>
## Code examples
Explore our GitHub repository for the [Launcher](https://github.com/docusign/code-examples-python/), a self-executing package housing code examples for the WebForms Python SDK. This package showcases several common use cases and their respective source files. Additionally, you can download a version preconfigured for your Docusign developer account from [Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/). These examples support both the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) and [JSON Web Token (JWT)](https://developers.docusign.com/platform/auth/jwt/) authentication workflows.

## OAuth implementations
For details regarding which type of OAuth grant will work best for your Docusign integration, see [Choose OAuth Type](https://developers.docusign.com/platform/auth/choose/) in the [Docusign Developer Center](https://developers.docusign.com/).

For security purposes, Docusign recommends using the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) flow.

<a id="changeLog"></a>
## Changelog
You can refer to the complete changelog [here](https://github.com/docusign/docusign-webforms-python-client/blob/master/CHANGELOG.md).

<a id="support"></a>
## Support
Log issues against this client SDK through GitHub. You can also reach out to us through [Docusign Community](https://community.docusign.com/developer-59) and [Stack Overflow](https://stackoverflow.com/questions/tagged/docusignapi).

<a id="license"></a>
## License
The Docusign WebForms Python Client SDK is licensed under the [MIT License](https://github.com/docusign/docusign-webforms-python-client/blob/master/LICENSE).

<a id="additionalResources"></a>
### Additional resources
* [Docusign Developer Center](https://developers.docusign.com/)
* [Docusign API on Twitter](https://twitter.com/docusignapi)
* [Docusign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/)
* [Docusign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2)

[pypi-image]: https://img.shields.io/pypi/v/docusign_webforms.svg?style=flat
[pypi-url]: https://pypi.python.org/pypi/docusign_webforms
[downloads-image]: https://img.shields.io/pypi/dm/docusign_webforms.svg?style=flat
[downloads-url]: https://pypi.python.org/pypi/docusign_webforms
1 change: 1 addition & 0 deletions docusign_webforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
from docusign_webforms.models.web_form_state import WebFormState
from docusign_webforms.models.web_form_summary import WebFormSummary
from docusign_webforms.models.web_form_summary_list import WebFormSummaryList
from docusign_webforms.models.web_form_type import WebFormType
from docusign_webforms.models.web_form_user_info import WebFormUserInfo
from docusign_webforms.models.web_form_values import WebFormValues

Expand Down
28 changes: 14 additions & 14 deletions docusign_webforms/apis/form_instance_management_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ def create_instance_with_http_info(self, account_id, form_id, create_instance_bo

collection_formats = {}

resource_path = '/accounts/{account_id}/forms/{form_id}/instances'.replace('{format}', 'json')
resource_path = '/v1.1/accounts/{accountId}/forms/{formId}/instances'.replace('{format}', 'json')
path_params = {}
if 'account_id' in params:
path_params['account_id'] = params['account_id']
path_params['accountId'] = params['account_id']
if 'form_id' in params:
path_params['form_id'] = params['form_id']
path_params['formId'] = params['form_id']

query_params = {}

Expand Down Expand Up @@ -239,14 +239,14 @@ def get_instance_with_http_info(self, account_id, form_id, instance_id, **kwargs

collection_formats = {}

resource_path = '/accounts/{account_id}/forms/{form_id}/instances/{instance_id}'.replace('{format}', 'json')
resource_path = '/v1.1/accounts/{accountId}/forms/{formId}/instances/{instanceId}'.replace('{format}', 'json')
path_params = {}
if 'account_id' in params:
path_params['account_id'] = params['account_id']
path_params['accountId'] = params['account_id']
if 'form_id' in params:
path_params['form_id'] = params['form_id']
path_params['formId'] = params['form_id']
if 'instance_id' in params:
path_params['instance_id'] = params['instance_id']
path_params['instanceId'] = params['instance_id']

query_params = {}

Expand Down Expand Up @@ -359,12 +359,12 @@ def list_instances_with_http_info(self, account_id, form_id, **kwargs):

collection_formats = {}

resource_path = '/accounts/{account_id}/forms/{form_id}/instances'.replace('{format}', 'json')
resource_path = '/v1.1/accounts/{accountId}/forms/{formId}/instances'.replace('{format}', 'json')
path_params = {}
if 'account_id' in params:
path_params['account_id'] = params['account_id']
path_params['accountId'] = params['account_id']
if 'form_id' in params:
path_params['form_id'] = params['form_id']
path_params['formId'] = params['form_id']

query_params = {}
if 'client_user_id' in params:
Expand Down Expand Up @@ -480,14 +480,14 @@ def refresh_token_with_http_info(self, account_id, form_id, instance_id, **kwarg

collection_formats = {}

resource_path = '/accounts/{account_id}/forms/{form_id}/instances/{instance_id}/refresh'.replace('{format}', 'json')
resource_path = '/v1.1/accounts/{accountId}/forms/{formId}/instances/{instanceId}/refresh'.replace('{format}', 'json')
path_params = {}
if 'account_id' in params:
path_params['account_id'] = params['account_id']
path_params['accountId'] = params['account_id']
if 'form_id' in params:
path_params['form_id'] = params['form_id']
path_params['formId'] = params['form_id']
if 'instance_id' in params:
path_params['instance_id'] = params['instance_id']
path_params['instanceId'] = params['instance_id']

query_params = {}

Expand Down
10 changes: 5 additions & 5 deletions docusign_webforms/apis/form_management_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ def get_form_with_http_info(self, account_id, form_id, **kwargs):

collection_formats = {}

resource_path = '/accounts/{account_id}/forms/{form_id}'.replace('{format}', 'json')
resource_path = '/v1.1/accounts/{accountId}/forms/{formId}'.replace('{format}', 'json')
path_params = {}
if 'account_id' in params:
path_params['account_id'] = params['account_id']
path_params['accountId'] = params['account_id']
if 'form_id' in params:
path_params['form_id'] = params['form_id']
path_params['formId'] = params['form_id']

query_params = {}
if 'state' in params:
Expand Down Expand Up @@ -244,10 +244,10 @@ def list_forms_with_http_info(self, account_id, **kwargs):

collection_formats = {}

resource_path = '/accounts/{account_id}/forms'.replace('{format}', 'json')
resource_path = '/v1.1/accounts/{accountId}/forms'.replace('{format}', 'json')
path_params = {}
if 'account_id' in params:
path_params['account_id'] = params['account_id']
path_params['accountId'] = params['account_id']

query_params = {}
if 'user_filter' in params:
Expand Down
Loading