diff --git a/README.md b/README.md index 3ad4f31..8f139fc 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,10 @@ All URIs are relative to *https://api.hellosign.com/v3* | *SignatureRequestApi* | [**signatureRequestCancel**](docs/Api/SignatureRequestApi.md#signaturerequestcancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbedded**](docs/Api/SignatureRequestApi.md#signaturerequestcreateembedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | *SignatureRequestApi* | [**signatureRequestCreateEmbeddedWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequestcreateembeddedwithtemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEdit**](docs/Api/SignatureRequestApi.md#signaturerequestedit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbedded**](docs/Api/SignatureRequestApi.md#signaturerequesteditembedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| *SignatureRequestApi* | [**signatureRequestEditEmbeddedWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequesteditembeddedwithtemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| *SignatureRequestApi* | [**signatureRequestEditWithTemplate**](docs/Api/SignatureRequestApi.md#signaturerequesteditwithtemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | *SignatureRequestApi* | [**signatureRequestFiles**](docs/Api/SignatureRequestApi.md#signaturerequestfiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | *SignatureRequestApi* | [**signatureRequestFilesAsDataUri**](docs/Api/SignatureRequestApi.md#signaturerequestfilesasdatauri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | *SignatureRequestApi* | [**signatureRequestFilesAsFileUrl**](docs/Api/SignatureRequestApi.md#signaturerequestfilesasfileurl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -253,6 +257,10 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SignatureRequestBulkSendWithTemplateRequest](docs/Model/SignatureRequestBulkSendWithTemplateRequest.md) - [SignatureRequestCreateEmbeddedRequest](docs/Model/SignatureRequestCreateEmbeddedRequest.md) - [SignatureRequestCreateEmbeddedWithTemplateRequest](docs/Model/SignatureRequestCreateEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditEmbeddedRequest](docs/Model/SignatureRequestEditEmbeddedRequest.md) +- [SignatureRequestEditEmbeddedWithTemplateRequest](docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md) +- [SignatureRequestEditRequest](docs/Model/SignatureRequestEditRequest.md) +- [SignatureRequestEditWithTemplateRequest](docs/Model/SignatureRequestEditWithTemplateRequest.md) - [SignatureRequestGetResponse](docs/Model/SignatureRequestGetResponse.md) - [SignatureRequestListResponse](docs/Model/SignatureRequestListResponse.md) - [SignatureRequestRemindRequest](docs/Model/SignatureRequestRemindRequest.md) @@ -408,5 +416,5 @@ apisupport@hellosign.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.3.0` + - Package version: `1.4.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/VERSION b/VERSION index f0bb29e..88c5fb8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0 +1.4.0 diff --git a/docs/Api/SignatureRequestApi.md b/docs/Api/SignatureRequestApi.md index 6286b96..9069bbe 100644 --- a/docs/Api/SignatureRequestApi.md +++ b/docs/Api/SignatureRequestApi.md @@ -9,6 +9,10 @@ All URIs are relative to https://api.hellosign.com/v3. | [**signatureRequestCancel()**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request | | [**signatureRequestCreateEmbedded()**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request | | [**signatureRequestCreateEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template | +| [**signatureRequestEdit()**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request | +| [**signatureRequestEditEmbedded()**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request | +| [**signatureRequestEditEmbeddedWithTemplate()**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template | +| [**signatureRequestEditWithTemplate()**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template | | [**signatureRequestFiles()**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files | | [**signatureRequestFilesAsDataUri()**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri | | [**signatureRequestFilesAsFileUrl()**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url | @@ -458,6 +462,390 @@ try { [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `signatureRequestEdit()` + +```php +signatureRequestEdit($signature_request_id, $signature_request_edit_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer1->setEmailAddress("jack@example.com") + ->setName("Jack") + ->setOrder(0); + +$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer2->setEmailAddress("jill@example.com") + ->setName("Jill") + ->setOrder(1); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(false) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); +$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$data = new Dropbox\Sign\Model\SignatureRequestEditRequest(); +$data->setTitle("NDA with Acme Co.") + ->setSubject("The NDA we talked about") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") + ->setSigners([$signer1, $signer2]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) + ->setMetadata([ + "custom_id" => 1234, + "custom_text" => "NDA #9", + ]) + ->setSigningOptions($signingOptions) + ->setFieldOptions($fieldOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEdit($signatureRequestId, $data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_request** | [**\Dropbox\Sign\Model\SignatureRequestEditRequest**](../Model/SignatureRequestEditRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbedded()` + +```php +signatureRequestEditEmbedded($signature_request_id, $signature_request_edit_embedded_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` + +Edit Embedded Signature Request + +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer1->setEmailAddress("jack@example.com") + ->setName("Jack") + ->setOrder(0); + +$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer2->setEmailAddress("jill@example.com") + ->setName("Jill") + ->setOrder(1); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(true) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest(); +$data->setClientId("ec64a202072370a737edf4a0eb7f4437") + ->setTitle("NDA with Acme Co.") + ->setSubject("The NDA we talked about") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") + ->setSigners([$signer1, $signer2]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) + ->setSigningOptions($signingOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEditEmbedded( + $signatureRequestId, + $data + ); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_embedded_request** | [**\Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest**](../Model/SignatureRequestEditEmbeddedRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditEmbeddedWithTemplate()` + +```php +signatureRequestEditEmbeddedWithTemplate($signature_request_id, $signature_request_edit_embedded_with_template_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` + +Edit Embedded Signature Request with Template + +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); +$signer1->setRole("Client") + ->setEmailAddress("george@example.com") + ->setName("George"); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(false) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest(); +$data->setClientId("ec64a202072370a737edf4a0eb7f4437") + ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) + ->setSubject("Purchase Order") + ->setMessage("Glad we could come to an agreement.") + ->setSigners([$signer1]) + ->setSigningOptions($signingOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEditEmbeddedWithTemplate( + $signatureRequestId, + $data + ); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_embedded_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest**](../Model/SignatureRequestEditEmbeddedWithTemplateRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `signatureRequestEditWithTemplate()` + +```php +signatureRequestEditWithTemplate($signature_request_id, $signature_request_edit_with_template_request): \Dropbox\Sign\Model\SignatureRequestGetResponse +``` + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```php +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); +$signer1->setRole("Client") + ->setEmailAddress("george@example.com") + ->setName("George"); + +$cc1 = new Dropbox\Sign\Model\SubCC(); +$cc1->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$customField1 = new Dropbox\Sign\Model\SubCustomField(); +$customField1->setName("Cost") + ->setValue("$20,000") + ->setEditor("Client") + ->setRequired(true); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(false) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$data = new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest(); +$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) + ->setSubject("Purchase Order") + ->setMessage("Glad we could come to an agreement.") + ->setSigners([$signer1]) + ->setCcs([$cc1]) + ->setCustomFields([$customField1]) + ->setSigningOptions($signingOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEditWithTemplate($signatureRequestId, $data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} + +``` + +### Parameters + +|Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **signature_request_id** | **string**| The id of the SignatureRequest to edit. | | +| **signature_request_edit_with_template_request** | [**\Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest**](../Model/SignatureRequestEditWithTemplateRequest.md)| | | + +### Return type + +[**\Dropbox\Sign\Model\SignatureRequestGetResponse**](../Model/SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../../README.md#api_key), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `multipart/form-data` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `signatureRequestFiles()` ```php diff --git a/docs/Model/BulkSendJobGetResponseSignatureRequests.md b/docs/Model/BulkSendJobGetResponseSignatureRequests.md index c342f11..1a565f1 100644 --- a/docs/Model/BulkSendJobGetResponseSignatureRequests.md +++ b/docs/Model/BulkSendJobGetResponseSignatureRequests.md @@ -24,6 +24,7 @@ Name | Type | Description | Notes | `details_url` | ```string``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | | `cc_email_addresses` | ```string[]``` | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | | | `signing_redirect_url` | ```string``` | The URL you want the signer redirected to after they successfully sign. | | +| `final_copy_uri` | ```string``` | The path where the completed document can be downloaded | | | `template_ids` | ```string[]``` | Templates IDs used in this SignatureRequest (if any). | | | `custom_fields` | [```\Dropbox\Sign\Model\SignatureRequestResponseCustomFieldBase[]```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | | `attachments` | [```\Dropbox\Sign\Model\SignatureRequestResponseAttachment[]```](SignatureRequestResponseAttachment.md) | Signer attachments. | | diff --git a/docs/Model/EventCallbackRequestEvent.md b/docs/Model/EventCallbackRequestEvent.md index 5fac892..84a3f87 100644 --- a/docs/Model/EventCallbackRequestEvent.md +++ b/docs/Model/EventCallbackRequestEvent.md @@ -9,6 +9,6 @@ Name | Type | Description | Notes | `event_time`*_required_ | ```string``` | Time the event was created (using Unix time). | | | `event_type`*_required_ | ```string``` | Type of callback event that was triggered. | | | `event_hash`*_required_ | ```string``` | Generated hash used to verify source of event data. | | -| `event_metadata`*_required_ | [```\Dropbox\Sign\Model\EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | | | +| `event_metadata` | [```\Dropbox\Sign\Model\EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md index dcbf301..897d2ab 100644 --- a/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ b/docs/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `template_ids`*_required_ | ```string[]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | | `client_id`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `signer_file` | ```\SplFileObject``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

**Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | +| `signer_file` | ```\SplFileObject``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | | `signer_list` | [```\Dropbox\Sign\Model\SubBulkSignerList[]```](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | | | `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | | `ccs` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | diff --git a/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md b/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md index 638f5f4..12ed468 100644 --- a/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md +++ b/docs/Model/SignatureRequestBulkSendWithTemplateRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `template_ids`*_required_ | ```string[]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `signer_file` | ```\SplFileObject``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

**Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | +| `signer_file` | ```\SplFileObject``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | | `signer_list` | [```\Dropbox\Sign\Model\SubBulkSignerList[]```](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | | | `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | | `ccs` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | diff --git a/docs/Model/SignatureRequestEditEmbeddedRequest.md b/docs/Model/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 0000000..ae1be0d --- /dev/null +++ b/docs/Model/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,34 @@ +# # SignatureRequestEditEmbeddedRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `client_id`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```\Dropbox\Sign\Model\SubSignatureRequestSigner[]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**Note**: Only available for Premium plan. | [default to false] | +| `attachments` | [```\Dropbox\Sign\Model\SubAttachment[]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```string[]``` | The email addresses that should be CCed. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```\Dropbox\Sign\Model\SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```\Dropbox\Sign\Model\SubFormFieldGroup[]```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```\Dropbox\Sign\Model\SubFormFieldRule[]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```bool``` | Enables automatic Text Tag removal when set to true.

**NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `populate_auto_fill_fields` | ```bool``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | +| `expires_at` | ```int``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md b/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 0000000..24ac5bd --- /dev/null +++ b/docs/Model/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,25 @@ +# # SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```string[]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `client_id`*_required_ | ```string``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `populate_auto_fill_fields` | ```bool``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | [default to false] | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestEditRequest.md b/docs/Model/SignatureRequestEditRequest.md new file mode 100644 index 0000000..7176bde --- /dev/null +++ b/docs/Model/SignatureRequestEditRequest.md @@ -0,0 +1,36 @@ +# # SignatureRequestEditRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```\Dropbox\Sign\Model\SubSignatureRequestSigner[]```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `grouped_signers` | [```\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `allow_reassign` | ```bool``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**Note**: Only available for Premium plan and higher. | [default to false] | +| `attachments` | [```\Dropbox\Sign\Model\SubAttachment[]```](SubAttachment.md) | A list describing the attachments | | +| `cc_email_addresses` | ```string[]``` | The email addresses that should be CCed. | | +| `client_id` | ```string``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `field_options` | [```\Dropbox\Sign\Model\SubFieldOptions```](SubFieldOptions.md) | | | +| `form_field_groups` | [```\Dropbox\Sign\Model\SubFormFieldGroup[]```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `form_field_rules` | [```\Dropbox\Sign\Model\SubFormFieldRule[]```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `form_fields_per_document` | [```\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hide_text_tags` | ```bool``` | Enables automatic Text Tag removal when set to true.

**NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | [default to false] | +| `is_qualified_signature` | ```bool``` | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**Note**: QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `is_eid` | ```bool``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | +| `use_text_tags` | ```bool``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | [default to false] | +| `expires_at` | ```int``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestEditWithTemplateRequest.md b/docs/Model/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 0000000..cdeaf9f --- /dev/null +++ b/docs/Model/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,27 @@ +# # SignatureRequestEditWithTemplateRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `template_ids`*_required_ | ```string[]``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allow_decline` | ```bool``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | [default to false] | +| `ccs` | [```\Dropbox\Sign\Model\SubCC[]```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `client_id` | ```string``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `custom_fields` | [```\Dropbox\Sign\Model\SubCustomField[]```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```\SplFileObject[]``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `file_urls` | ```string[]``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `is_qualified_signature` | ```bool``` | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**Note**: QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `is_eid` | ```bool``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | [default to false] | +| `message` | ```string``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```array``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signing_options` | [```\Dropbox\Sign\Model\SubSigningOptions```](SubSigningOptions.md) | | | +| `signing_redirect_url` | ```string``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```string``` | The subject in the email that will be sent to the signers. | | +| `test_mode` | ```bool``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | [default to false] | +| `title` | ```string``` | The title you want to assign to the SignatureRequest. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SignatureRequestResponse.md b/docs/Model/SignatureRequestResponse.md index 987aa49..f5d59e8 100644 --- a/docs/Model/SignatureRequestResponse.md +++ b/docs/Model/SignatureRequestResponse.md @@ -24,10 +24,12 @@ Name | Type | Description | Notes | `details_url` | ```string``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | | `cc_email_addresses` | ```string[]``` | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | | | `signing_redirect_url` | ```string``` | The URL you want the signer redirected to after they successfully sign. | | +| `final_copy_uri` | ```string``` | The path where the completed document can be downloaded | | | `template_ids` | ```string[]``` | Templates IDs used in this SignatureRequest (if any). | | | `custom_fields` | [```\Dropbox\Sign\Model\SignatureRequestResponseCustomFieldBase[]```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | | `attachments` | [```\Dropbox\Sign\Model\SignatureRequestResponseAttachment[]```](SignatureRequestResponseAttachment.md) | Signer attachments. | | | `response_data` | [```\Dropbox\Sign\Model\SignatureRequestResponseDataBase[]```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | | `signatures` | [```\Dropbox\Sign\Model\SignatureRequestResponseSignatures[]```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | +| `bulk_send_job_id` | ```string``` | The ID of the Bulk Send job which sent the signature request, if applicable. | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubFormFieldsPerDocumentDateSigned.md b/docs/Model/SubFormFieldsPerDocumentDateSigned.md index 234071e..41c4c94 100644 --- a/docs/Model/SubFormFieldsPerDocumentDateSigned.md +++ b/docs/Model/SubFormFieldsPerDocumentDateSigned.md @@ -8,6 +8,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | [default to 'date_signed'] | | `font_family` | ```string``` | Font family for the field. | | -| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | +| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [default to 12] | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubFormFieldsPerDocumentDropdown.md b/docs/Model/SubFormFieldsPerDocumentDropdown.md index bce9cfb..71eb05e 100644 --- a/docs/Model/SubFormFieldsPerDocumentDropdown.md +++ b/docs/Model/SubFormFieldsPerDocumentDropdown.md @@ -10,6 +10,6 @@ Name | Type | Description | Notes | `options`*_required_ | ```string[]``` | Array of string values representing dropdown values. | | | `content` | ```string``` | Selected value in `options` array. Value must exist in array. | | | `font_family` | ```string``` | Font family for the field. | | -| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | +| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [default to 12] | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubFormFieldsPerDocumentHyperlink.md b/docs/Model/SubFormFieldsPerDocumentHyperlink.md index 5dfa5e3..04ec5da 100644 --- a/docs/Model/SubFormFieldsPerDocumentHyperlink.md +++ b/docs/Model/SubFormFieldsPerDocumentHyperlink.md @@ -10,6 +10,6 @@ Name | Type | Description | Notes | `content`*_required_ | ```string``` | Link Text. | | | `content_url`*_required_ | ```string``` | Link URL. | | | `font_family` | ```string``` | Font family for the field. | | -| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | +| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [default to 12] | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubFormFieldsPerDocumentText.md b/docs/Model/SubFormFieldsPerDocumentText.md index 71deac1..75ef8b6 100644 --- a/docs/Model/SubFormFieldsPerDocumentText.md +++ b/docs/Model/SubFormFieldsPerDocumentText.md @@ -16,6 +16,6 @@ Name | Type | Description | Notes | `validation_custom_regex_format_label` | ```string``` | | | | `content` | ```string``` | Content of a `me_now` text field | | | `font_family` | ```string``` | Font family for the field. | | -| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | +| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [default to 12] | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubFormFieldsPerDocumentTextMerge.md b/docs/Model/SubFormFieldsPerDocumentTextMerge.md index d867e48..a2d84da 100644 --- a/docs/Model/SubFormFieldsPerDocumentTextMerge.md +++ b/docs/Model/SubFormFieldsPerDocumentTextMerge.md @@ -8,6 +8,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- | `type`*_required_ | ```string``` | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | [default to 'text-merge'] | | `font_family` | ```string``` | Font family for the field. | | -| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | +| `font_size` | ```int``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | [default to 12] | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubSignatureRequestSigner.md b/docs/Model/SubSignatureRequestSigner.md index 8169217..a65cc8b 100644 --- a/docs/Model/SubSignatureRequestSigner.md +++ b/docs/Model/SubSignatureRequestSigner.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes | `email_address`*_required_ | ```string``` | The email address of the signer. | | | `order` | ```int``` | The order the signer is required to sign in. | | | `pin` | ```string``` | The 4- to 12-character access code that will secure this signer's signature page. | | -| `sms_phone_number` | ```string``` | An E.164 formatted phone number.

**Note**: Not available in test mode and requires a Standard plan or higher. | | +| `sms_phone_number` | ```string``` | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**Note**: Not available in test mode and requires a Standard plan or higher. | | | `sms_phone_number_type` | ```string``` | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SubSignatureRequestTemplateSigner.md b/docs/Model/SubSignatureRequestTemplateSigner.md index 9082b20..1c7a17d 100644 --- a/docs/Model/SubSignatureRequestTemplateSigner.md +++ b/docs/Model/SubSignatureRequestTemplateSigner.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes | `name`*_required_ | ```string``` | The name of the signer. | | | `email_address`*_required_ | ```string``` | The email address of the signer. | | | `pin` | ```string``` | The 4- to 12-character access code that will secure this signer's signature page. | | -| `sms_phone_number` | ```string``` | An E.164 formatted phone number.

**Note**: Not available in test mode and requires a Standard plan or higher. | | +| `sms_phone_number` | ```string``` | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**Note**: Not available in test mode and requires a Standard plan or higher. | | | `sms_phone_number_type` | ```string``` | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/examples/SignatureRequestEdit.php b/examples/SignatureRequestEdit.php new file mode 100644 index 0000000..67b7c92 --- /dev/null +++ b/examples/SignatureRequestEdit.php @@ -0,0 +1,62 @@ +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer1->setEmailAddress("jack@example.com") + ->setName("Jack") + ->setOrder(0); + +$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer2->setEmailAddress("jill@example.com") + ->setName("Jill") + ->setOrder(1); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(false) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$fieldOptions = new Dropbox\Sign\Model\SubFieldOptions(); +$fieldOptions->setDateFormat(Dropbox\Sign\Model\SubFieldOptions::DATE_FORMAT_DD_MM_YYYY); + +$data = new Dropbox\Sign\Model\SignatureRequestEditRequest(); +$data->setTitle("NDA with Acme Co.") + ->setSubject("The NDA we talked about") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") + ->setSigners([$signer1, $signer2]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) + ->setMetadata([ + "custom_id" => 1234, + "custom_text" => "NDA #9", + ]) + ->setSigningOptions($signingOptions) + ->setFieldOptions($fieldOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEdit($signatureRequestId, $data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/SignatureRequestEditEmbedded.php b/examples/SignatureRequestEditEmbedded.php new file mode 100644 index 0000000..7af9b39 --- /dev/null +++ b/examples/SignatureRequestEditEmbedded.php @@ -0,0 +1,58 @@ +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer1->setEmailAddress("jack@example.com") + ->setName("Jack") + ->setOrder(0); + +$signer2 = new Dropbox\Sign\Model\SubSignatureRequestSigner(); +$signer2->setEmailAddress("jill@example.com") + ->setName("Jill") + ->setOrder(1); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(true) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedRequest(); +$data->setClientId("ec64a202072370a737edf4a0eb7f4437") + ->setTitle("NDA with Acme Co.") + ->setSubject("The NDA we talked about") + ->setMessage("Please sign this NDA and then we can discuss more. Let me know if you have any questions.") + ->setSigners([$signer1, $signer2]) + ->setCcEmailAddresses([ + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com", + ]) + ->setFiles([new SplFileObject(__DIR__ . "/example_signature_request.pdf")]) + ->setSigningOptions($signingOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEditEmbedded( + $signatureRequestId, + $data + ); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.php b/examples/SignatureRequestEditEmbeddedWithTemplate.php new file mode 100644 index 0000000..2ab8d47 --- /dev/null +++ b/examples/SignatureRequestEditEmbeddedWithTemplate.php @@ -0,0 +1,48 @@ +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); +$signer1->setRole("Client") + ->setEmailAddress("george@example.com") + ->setName("George"); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(false) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$data = new Dropbox\Sign\Model\SignatureRequestEditEmbeddedWithTemplateRequest(); +$data->setClientId("ec64a202072370a737edf4a0eb7f4437") + ->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) + ->setSubject("Purchase Order") + ->setMessage("Glad we could come to an agreement.") + ->setSigners([$signer1]) + ->setSigningOptions($signingOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEditEmbeddedWithTemplate( + $signatureRequestId, + $data + ); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/examples/SignatureRequestEditWithTemplate.php b/examples/SignatureRequestEditWithTemplate.php new file mode 100644 index 0000000..d9fe64d --- /dev/null +++ b/examples/SignatureRequestEditWithTemplate.php @@ -0,0 +1,56 @@ +setUsername("YOUR_API_KEY"); + +// or, configure Bearer (JWT) authorization: oauth2 +// $config->setAccessToken("YOUR_ACCESS_TOKEN"); + +$signatureRequestApi = new Dropbox\Sign\Api\SignatureRequestApi($config); + +$signer1 = new Dropbox\Sign\Model\SubSignatureRequestTemplateSigner(); +$signer1->setRole("Client") + ->setEmailAddress("george@example.com") + ->setName("George"); + +$cc1 = new Dropbox\Sign\Model\SubCC(); +$cc1->setRole("Accounting") + ->setEmailAddress("accounting@example.com"); + +$customField1 = new Dropbox\Sign\Model\SubCustomField(); +$customField1->setName("Cost") + ->setValue("$20,000") + ->setEditor("Client") + ->setRequired(true); + +$signingOptions = new Dropbox\Sign\Model\SubSigningOptions(); +$signingOptions->setDraw(true) + ->setType(true) + ->setUpload(true) + ->setPhone(false) + ->setDefaultType(Dropbox\Sign\Model\SubSigningOptions::DEFAULT_TYPE_DRAW); + +$data = new Dropbox\Sign\Model\SignatureRequestEditWithTemplateRequest(); +$data->setTemplateIds(["c26b8a16784a872da37ea946b9ddec7c1e11dff6"]) + ->setSubject("Purchase Order") + ->setMessage("Glad we could come to an agreement.") + ->setSigners([$signer1]) + ->setCcs([$cc1]) + ->setCustomFields([$customField1]) + ->setSigningOptions($signingOptions) + ->setTestMode(true); + +$signatureRequestId = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"; + +try { + $result = $signatureRequestApi->signatureRequestEditWithTemplate($signatureRequestId, $data); + print_r($result); +} catch (Dropbox\Sign\ApiException $e) { + $error = $e->getResponseObject(); + echo "Exception when calling Dropbox Sign API: " + . print_r($error->getError()); +} diff --git a/openapi-config.yaml b/openapi-config.yaml index ae6594b..9feb4cf 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -4,7 +4,7 @@ typeMappings: additionalProperties: packageName: dropbox/sign packageVersion: "^1.3.0" - artifactVersion: 1.3.0 + artifactVersion: 1.4.0 invokerPackage: "Dropbox\\Sign" sortModelPropertiesByRequiredFlag: true srcBasePath: src diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 6ef2e00..d77d984 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -457,7 +457,7 @@ paths: schema: $ref: '#/components/schemas/ApiAppCreateRequest' responses: - 200: + 201: description: 'successful operation' headers: X-RateLimit-Limit: @@ -2226,35 +2226,39 @@ paths: seo: title: 'Signature Request with Template | Dropbox Sign for Developers' description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create a new SignatureRequest based on the given Template, click here.' - '/signature_request/files/{signature_request_id}': - get: + '/signature_request/edit/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files' + summary: 'Edit Signature Request' description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. + Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFiles + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEdit parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - default: pdf - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditRequestDefaultExample' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditRequestGroupedSignersExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditRequest' responses: 200: description: 'successful operation' @@ -2266,14 +2270,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditResponseExample' 4XX: description: failed_operation content: @@ -2293,8 +2295,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -2311,65 +2311,78 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestFiles.php + $ref: examples/SignatureRequestEdit.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFiles.cs + $ref: examples/SignatureRequestEdit.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestFiles.js + $ref: examples/SignatureRequestEdit.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFiles.ts + $ref: examples/SignatureRequestEdit.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFiles.java + $ref: examples/SignatureRequestEdit.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFiles.rb + $ref: examples/SignatureRequestEdit.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFiles.py + $ref: examples/SignatureRequestEdit.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFiles.sh + $ref: examples/SignatureRequestEdit.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_data_uri/{signature_request_id}': - get: + title: 'Edit Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest with the submitted documents, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsDataUri + summary: 'Edit Embedded Signature Request' + description: 'Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbedded parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestDefaultExample' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedRequestGroupedSignersExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedRequest' responses: 200: description: 'successful operation' @@ -2383,10 +2396,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponseDataUri' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' + $ref: '#/components/examples/SignatureRequestEditEmbeddedResponseExample' 4XX: description: failed_operation content: @@ -2406,8 +2419,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -2417,79 +2428,82 @@ paths: api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsDataUri.php + $ref: examples/SignatureRequestEditEmbedded.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsDataUri.cs + $ref: examples/SignatureRequestEditEmbedded.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestFilesAsDataUri.js + $ref: examples/SignatureRequestEditEmbedded.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsDataUri.ts + $ref: examples/SignatureRequestEditEmbedded.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsDataUri.java + $ref: examples/SignatureRequestEditEmbedded.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsDataUri.rb + $ref: examples/SignatureRequestEditEmbedded.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsDataUri.py + $ref: examples/SignatureRequestEditEmbedded.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsDataUri.sh + $ref: examples/SignatureRequestEditEmbedded.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/files_as_file_url/{signature_request_id}': - get: + title: 'Edit Embedded Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to edit a SignatureRequest in an iFrame, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_embedded_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Download Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. - operationId: signatureRequestFilesAsFileUrl + summary: 'Edit Embedded Signature Request with Template' + description: 'Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign.' + operationId: signatureRequestEditEmbeddedWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditEmbeddedWithTemplateRequest' responses: 200: description: 'successful operation' @@ -2503,10 +2517,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestFilesResponseExample' + $ref: '#/components/examples/SignatureRequestEditEmbeddedWithTemplateResponseExample' 4XX: description: failed_operation content: @@ -2526,8 +2540,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -2537,69 +2549,85 @@ paths: api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestFilesAsFileUrl.php + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestFilesAsFileUrl.cs + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.js + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestFilesAsFileUrl.ts + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestFilesAsFileUrl.java + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestFilesAsFileUrl.rb + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestFilesAsFileUrl.py + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestFilesAsFileUrl.sh + $ref: examples/SignatureRequestEditEmbeddedWithTemplate.sh x-meta: seo: - title: 'Download Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' - '/signature_request/{signature_request_id}': - get: + title: 'Signature Request with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based on the given Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/edit_with_template/{signature_request_id}': + put: tags: - 'Signature Request' - summary: 'Get Signature Request' - description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' - operationId: signatureRequestGet + summary: 'Edit Signature Request With Template' + description: |- + Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + + **NOTE:** Edit and resend will not deduct your signature request quota. + operationId: signatureRequestEditWithTemplate parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to retrieve.' + description: 'The id of the SignatureRequest to edit.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestEditWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestEditWithTemplateRequest' responses: 200: description: 'successful operation' @@ -2616,7 +2644,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestGetResponseExample' + $ref: '#/components/examples/SignatureRequestEditWithTemplateResponseExample' 4XX: description: failed_operation content: @@ -2634,8 +2662,10 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2650,84 +2680,77 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestGet.php + $ref: examples/SignatureRequestEditWithTemplate.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestGet.cs + $ref: examples/SignatureRequestEditWithTemplate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestGet.js + $ref: examples/SignatureRequestEditWithTemplate.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestGet.ts + $ref: examples/SignatureRequestEditWithTemplate.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestGet.java + $ref: examples/SignatureRequestEditWithTemplate.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestGet.rb + $ref: examples/SignatureRequestEditWithTemplate.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestGet.py + $ref: examples/SignatureRequestEditWithTemplate.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestGet.sh + $ref: examples/SignatureRequestEditWithTemplate.sh x-meta: seo: - title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' - /signature_request/list: + title: 'Edit Signature Request with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to edit a SignatureRequest based off of the Template, click here.' + x-hideOn: doc + x-beta: closed + '/signature_request/files/{signature_request_id}': get: tags: - 'Signature Request' - summary: 'List Signature Requests' + summary: 'Download Files' description: |- - Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. - operationId: signatureRequestList + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFiles parameters: - - name: account_id - in: query - description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to retrieve.' + required: true schema: type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - - name: page - in: query - description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - example: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - - - name: query + name: file_type in: query - description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + default: pdf + enum: + - pdf + - zip responses: 200: description: 'successful operation' @@ -2739,12 +2762,14 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/SignatureRequestListResponse' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestListResponseExample' + type: string + format: binary + application/zip: + schema: + type: string + format: binary 4XX: description: failed_operation content: @@ -2760,8 +2785,14 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2776,58 +2807,61 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestList.php + $ref: examples/SignatureRequestFiles.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestList.cs + $ref: examples/SignatureRequestFiles.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestList.js + $ref: examples/SignatureRequestFiles.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestList.ts + $ref: examples/SignatureRequestFiles.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestList.java + $ref: examples/SignatureRequestFiles.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestList.rb + $ref: examples/SignatureRequestFiles.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestList.py + $ref: examples/SignatureRequestFiles.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestList.sh + $ref: examples/SignatureRequestFiles.sh x-meta: seo: - title: 'List Signature Requests | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' - '/signature_request/release_hold/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_data_uri/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Release On-Hold Signature Request' - description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' - operationId: signatureRequestReleaseHold - parameters: - - - name: signature_request_id - in: path - description: 'The id of the SignatureRequest to release.' + summary: 'Download Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsDataUri + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string @@ -2845,10 +2879,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: default_example: - $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' + $ref: '#/components/examples/SignatureRequestFilesResponseExample' 4XX: description: failed_operation content: @@ -2866,6 +2900,12 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -2873,80 +2913,79 @@ paths: api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestReleaseHold.php + $ref: examples/SignatureRequestFilesAsDataUri.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestReleaseHold.cs + $ref: examples/SignatureRequestFilesAsDataUri.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestReleaseHold.js + $ref: examples/SignatureRequestFilesAsDataUri.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestReleaseHold.ts + $ref: examples/SignatureRequestFilesAsDataUri.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestReleaseHold.java + $ref: examples/SignatureRequestFilesAsDataUri.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestReleaseHold.rb + $ref: examples/SignatureRequestFilesAsDataUri.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestReleaseHold.py + $ref: examples/SignatureRequestFilesAsDataUri.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestReleaseHold.sh + $ref: examples/SignatureRequestFilesAsDataUri.sh x-meta: seo: - title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' - '/signature_request/remind/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/files_as_file_url/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Send Request Reminder' + summary: 'Download Files as File Url' description: |- - Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. + Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - **NOTE**: This action can **not** be used with embedded signature requests. - operationId: signatureRequestRemind + If the files are currently being prepared, a status code of `409` will be returned instead. + operationId: signatureRequestFilesAsFileUrl parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to send a reminder for.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string example: fa5c8a0b0f492d768749333ad6fcc214c111e967 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestRemindRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: 200: description: 'successful operation' @@ -2960,10 +2999,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/FileResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestRemindResponseExample' + $ref: '#/components/examples/SignatureRequestFilesResponseExample' 4XX: description: failed_operation content: @@ -3001,63 +3040,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemind.php + $ref: examples/SignatureRequestFilesAsFileUrl.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemind.cs + $ref: examples/SignatureRequestFilesAsFileUrl.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestRemind.js + $ref: examples/SignatureRequestFilesAsFileUrl.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemind.ts + $ref: examples/SignatureRequestFilesAsFileUrl.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemind.java + $ref: examples/SignatureRequestFilesAsFileUrl.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemind.rb + $ref: examples/SignatureRequestFilesAsFileUrl.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemind.py + $ref: examples/SignatureRequestFilesAsFileUrl.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemind.sh + $ref: examples/SignatureRequestFilesAsFileUrl.sh x-meta: seo: - title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' - '/signature_request/remove/{signature_request_id}': - post: + title: 'Download Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to get the current documents specified by the parameters, click here' + '/signature_request/{signature_request_id}': + get: tags: - 'Signature Request' - summary: 'Remove Signature Request Access' - description: |- - Removes your access to a completed signature request. This action is **not reversible**. - - The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). - - Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. - operationId: signatureRequestRemove + summary: 'Get Signature Request' + description: 'Returns the status of the SignatureRequest specified by the `signature_request_id` parameter.' + operationId: signatureRequestGet parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to remove.' + description: 'The id of the SignatureRequest to retrieve.' required: true schema: type: string @@ -3073,7 +3107,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestGetResponseExample' 4XX: description: failed_operation content: @@ -3091,8 +3130,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' 410_example: $ref: '#/components/examples/Error410ResponseExample' 4XX_example: @@ -3100,72 +3137,93 @@ paths: security: - api_key: [] + - + oauth2: + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestRemove.php + $ref: examples/SignatureRequestGet.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestRemove.cs + $ref: examples/SignatureRequestGet.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestRemove.js + $ref: examples/SignatureRequestGet.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestRemove.ts + $ref: examples/SignatureRequestGet.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestRemove.java + $ref: examples/SignatureRequestGet.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestRemove.rb + $ref: examples/SignatureRequestGet.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestRemove.py + $ref: examples/SignatureRequestGet.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestRemove.sh + $ref: examples/SignatureRequestGet.sh x-meta: seo: - title: 'Remove Signature Request Access | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' - /signature_request/send: - post: + title: 'Get Signature Request | Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return the status of SignatureRequest specified by the parameters, click here.' + /signature_request/list: + get: tags: - 'Signature Request' - summary: 'Send Signature Request' - description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' - operationId: signatureRequestSend - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' - grouped_signers_example: - $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendRequest' + summary: 'List Signature Requests' + description: |- + Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + + Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + operationId: signatureRequestList + parameters: + - + name: account_id + in: query + description: 'Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the SignatureRequest List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + example: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the SignatureRequest objects.' + schema: + type: string responses: 200: description: 'successful operation' @@ -3179,10 +3237,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestGetResponse' + $ref: '#/components/schemas/SignatureRequestListResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestSendResponseExample' + $ref: '#/components/examples/SignatureRequestListResponseExample' 4XX: description: failed_operation content: @@ -3200,8 +3258,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3216,82 +3272,79 @@ paths: lang: PHP label: PHP source: - $ref: examples/SignatureRequestSend.php + $ref: examples/SignatureRequestList.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSend.cs + $ref: examples/SignatureRequestList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestSend.js + $ref: examples/SignatureRequestList.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSend.ts + $ref: examples/SignatureRequestList.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSend.java + $ref: examples/SignatureRequestList.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSend.rb + $ref: examples/SignatureRequestList.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSend.py + $ref: examples/SignatureRequestList.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSend.sh + $ref: examples/SignatureRequestList.sh x-meta: seo: - title: 'Send Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' - /signature_request/send_with_template: + title: 'List Signature Requests | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to return a list of SignatureRequests that you can access, click here.' + '/signature_request/release_hold/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Send with Template' - description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' - operationId: signatureRequestSendWithTemplate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' - examples: - default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' - responses: - 200: - description: 'successful operation' - headers: - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-Ratelimit-Reset: - $ref: '#/components/headers/X-Ratelimit-Reset' - content: + summary: 'Release On-Hold Signature Request' + description: 'Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers.' + operationId: signatureRequestReleaseHold + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to release.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: application/json: schema: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' + $ref: '#/components/examples/SignatureRequestReleaseHoldResponseExample' 4XX: description: failed_operation content: @@ -3307,8 +3360,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3316,70 +3369,67 @@ paths: api_key: [] - oauth2: - - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestSendWithTemplate.php + $ref: examples/SignatureRequestReleaseHold.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestSendWithTemplate.cs + $ref: examples/SignatureRequestReleaseHold.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestSendWithTemplate.js + $ref: examples/SignatureRequestReleaseHold.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestSendWithTemplate.ts + $ref: examples/SignatureRequestReleaseHold.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestSendWithTemplate.java + $ref: examples/SignatureRequestReleaseHold.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestSendWithTemplate.rb + $ref: examples/SignatureRequestReleaseHold.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestSendWithTemplate.py + $ref: examples/SignatureRequestReleaseHold.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestSendWithTemplate.sh + $ref: examples/SignatureRequestReleaseHold.sh x-meta: seo: - title: 'Send with Template | API Documentation | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' - '/signature_request/update/{signature_request_id}': + title: 'Release On-Hold Signature Request | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to release an on-hold SignatureRequest, click here.' + '/signature_request/remind/{signature_request_id}': post: tags: - 'Signature Request' - summary: 'Update Signature Request' + summary: 'Send Request Reminder' description: |- - Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. - - Updating the email address of a signer will generate a new `signature_id` value. + Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. - **NOTE**: This action cannot be performed on a signature request with an appended signature page. - operationId: signatureRequestUpdate + **NOTE**: This action can **not** be used with embedded signature requests. + operationId: signatureRequestRemind parameters: - name: signature_request_id in: path - description: 'The id of the SignatureRequest to update.' + description: 'The id of the SignatureRequest to send a reminder for.' required: true schema: type: string @@ -3389,10 +3439,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignatureRequestUpdateRequest' + $ref: '#/components/schemas/SignatureRequestRemindRequest' examples: default_example: - $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' + $ref: '#/components/examples/SignatureRequestRemindRequestDefaultExample' responses: 200: description: 'successful operation' @@ -3409,7 +3459,7 @@ paths: $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/SignatureRequestUpdateResponseExample' + $ref: '#/components/examples/SignatureRequestRemindResponseExample' 4XX: description: failed_operation content: @@ -3427,6 +3477,12 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3434,79 +3490,74 @@ paths: api_key: [] - oauth2: + - request_signature - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/SignatureRequestUpdate.php + $ref: examples/SignatureRequestRemind.php - lang: 'C#' label: 'C#' source: - $ref: examples/SignatureRequestUpdate.cs + $ref: examples/SignatureRequestRemind.cs - lang: JavaScript label: JavaScript source: - $ref: examples/SignatureRequestUpdate.js + $ref: examples/SignatureRequestRemind.js - lang: TypeScript label: TypeScript source: - $ref: examples/SignatureRequestUpdate.ts + $ref: examples/SignatureRequestRemind.ts - lang: Java label: Java source: - $ref: examples/SignatureRequestUpdate.java + $ref: examples/SignatureRequestRemind.java - lang: Ruby label: Ruby source: - $ref: examples/SignatureRequestUpdate.rb + $ref: examples/SignatureRequestRemind.rb - lang: Python label: Python source: - $ref: examples/SignatureRequestUpdate.py + $ref: examples/SignatureRequestRemind.py - lang: cURL label: cURL source: - $ref: examples/SignatureRequestUpdate.sh + $ref: examples/SignatureRequestRemind.sh x-meta: seo: - title: 'Update Signature Request | REST API | Dropbox Sign for Developers' - description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' - /team/add_member: - put: + title: 'Send Request Reminder | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to send an email reminder to the signer, click here.' + '/signature_request/remove/{signature_request_id}': + post: tags: - - Team - summary: 'Add User to Team' - description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' - operationId: teamAddMember + - 'Signature Request' + summary: 'Remove Signature Request Access' + description: |- + Removes your access to a completed signature request. This action is **not reversible**. + + The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). + + Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + operationId: signatureRequestRemove parameters: - - name: team_id - in: query - description: 'The id of the team.' - required: false + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to remove.' + required: true schema: type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TeamAddMemberRequest' - examples: - email_address: - $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 responses: 200: description: 'successful operation' @@ -3518,12 +3569,7 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TeamGetResponse' - examples: - default_example: - $ref: '#/components/examples/TeamAddMemberResponseExample' + application/json: {} 4XX: description: failed_operation content: @@ -3541,75 +3587,81 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: - api_key: [] - - - oauth2: - - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamAddMember.php + $ref: examples/SignatureRequestRemove.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamAddMember.cs + $ref: examples/SignatureRequestRemove.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamAddMember.js + $ref: examples/SignatureRequestRemove.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamAddMember.ts + $ref: examples/SignatureRequestRemove.ts - lang: Java label: Java source: - $ref: examples/TeamAddMember.java + $ref: examples/SignatureRequestRemove.java - lang: Ruby label: Ruby source: - $ref: examples/TeamAddMember.rb + $ref: examples/SignatureRequestRemove.rb - lang: Python label: Python source: - $ref: examples/TeamAddMember.py + $ref: examples/SignatureRequestRemove.py - lang: cURL label: cURL source: - $ref: examples/TeamAddMember.sh + $ref: examples/SignatureRequestRemove.sh x-meta: seo: - title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' - /team/create: + title: 'Remove Signature Request Access | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom integrations. To find out how to remove your access to a completed signature request, click here.' + /signature_request/send: post: tags: - - Team - summary: 'Create Team' - description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' - operationId: teamCreate + - 'Signature Request' + summary: 'Send Signature Request' + description: 'Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents.' + operationId: signatureRequestSend requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamCreateRequest' + $ref: '#/components/schemas/SignatureRequestSendRequest' examples: default_example: - $ref: '#/components/examples/TeamCreateRequestDefaultExample' + $ref: '#/components/examples/SignatureRequestSendRequestDefaultExample' + grouped_signers_example: + $ref: '#/components/examples/SignatureRequestSendRequestGroupedSignersExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendRequest' responses: 200: description: 'successful operation' @@ -3623,10 +3675,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/TeamCreateResponseExample' + $ref: '#/components/examples/SignatureRequestSendResponseExample' 4XX: description: failed_operation content: @@ -3642,6 +3694,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3649,59 +3705,72 @@ paths: api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamCreate.php + $ref: examples/SignatureRequestSend.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamCreate.cs + $ref: examples/SignatureRequestSend.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamCreate.js + $ref: examples/SignatureRequestSend.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamCreate.ts + $ref: examples/SignatureRequestSend.ts - lang: Java label: Java source: - $ref: examples/TeamCreate.java + $ref: examples/SignatureRequestSend.java - lang: Ruby label: Ruby source: - $ref: examples/TeamCreate.rb + $ref: examples/SignatureRequestSend.rb - lang: Python label: Python source: - $ref: examples/TeamCreate.py + $ref: examples/SignatureRequestSend.py - lang: cURL label: cURL source: - $ref: examples/TeamCreate.sh + $ref: examples/SignatureRequestSend.sh x-meta: seo: - title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' - /team/destroy: - delete: + title: 'Send Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send new SignatureRequest with the submitted documents, click here.' + /signature_request/send_with_template: + post: tags: - - Team - summary: 'Delete Team' - description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' - operationId: teamDelete + - 'Signature Request' + summary: 'Send with Template' + description: 'Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter.' + operationId: signatureRequestSendWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/SignatureRequestSendWithTemplateRequest' responses: 200: description: 'successful operation' @@ -3712,6 +3781,13 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestGetResponse' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestSendWithTemplateResponseExample' 4XX: description: failed_operation content: @@ -3727,6 +3803,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3734,59 +3812,83 @@ paths: api_key: [] - oauth2: - - team_access + - request_signature + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamDelete.php + $ref: examples/SignatureRequestSendWithTemplate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamDelete.cs + $ref: examples/SignatureRequestSendWithTemplate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamDelete.js + $ref: examples/SignatureRequestSendWithTemplate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamDelete.ts + $ref: examples/SignatureRequestSendWithTemplate.ts - lang: Java label: Java source: - $ref: examples/TeamDelete.java + $ref: examples/SignatureRequestSendWithTemplate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamDelete.rb + $ref: examples/SignatureRequestSendWithTemplate.rb - lang: Python label: Python source: - $ref: examples/TeamDelete.py + $ref: examples/SignatureRequestSendWithTemplate.py - lang: cURL label: cURL source: - $ref: examples/TeamDelete.sh + $ref: examples/SignatureRequestSendWithTemplate.sh x-meta: seo: - title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' - /team: - get: + title: 'Send with Template | API Documentation | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to create and send a new SignatureRequest based off of the Template, click here.' + '/signature_request/update/{signature_request_id}': + post: tags: - - Team - summary: 'Get Team' - description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' - operationId: teamGet + - 'Signature Request' + summary: 'Update Signature Request' + description: |- + Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. + + Updating the email address of a signer will generate a new `signature_id` value. + + **NOTE**: This action cannot be performed on a signature request with an appended signature page. + operationId: signatureRequestUpdate + parameters: + - + name: signature_request_id + in: path + description: 'The id of the SignatureRequest to update.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SignatureRequestUpdateRequest' + examples: + default_example: + $ref: '#/components/examples/SignatureRequestUpdateRequestDefaultExample' responses: 200: description: 'successful operation' @@ -3800,10 +3902,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetResponse' + $ref: '#/components/schemas/SignatureRequestGetResponse' examples: default_example: - $ref: '#/components/examples/TeamGetResponseExample' + $ref: '#/components/examples/SignatureRequestUpdateResponseExample' 4XX: description: failed_operation content: @@ -3820,7 +3922,7 @@ paths: 403_example: $ref: '#/components/examples/Error403ResponseExample' 404_example: - $ref: '#/components/examples/TeamDoesNotExistResponseExample' + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3828,67 +3930,79 @@ paths: api_key: [] - oauth2: - - team_access + - signature_request_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamGet.php + $ref: examples/SignatureRequestUpdate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamGet.cs + $ref: examples/SignatureRequestUpdate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamGet.js + $ref: examples/SignatureRequestUpdate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamGet.ts + $ref: examples/SignatureRequestUpdate.ts - lang: Java label: Java source: - $ref: examples/TeamGet.java + $ref: examples/SignatureRequestUpdate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamGet.rb + $ref: examples/SignatureRequestUpdate.rb - lang: Python label: Python source: - $ref: examples/TeamGet.py + $ref: examples/SignatureRequestUpdate.py - lang: cURL label: cURL source: - $ref: examples/TeamGet.sh + $ref: examples/SignatureRequestUpdate.sh x-meta: seo: - title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + title: 'Update Signature Request | REST API | Dropbox Sign for Developers' + description: 'Dropbox Sign API allows you to build custom integrations. To find out how to update the email address/name for a signer on a signature request, click here.' + /team/add_member: put: tags: - Team - summary: 'Update Team' - description: 'Updates the name of your Team.' - operationId: teamUpdate + summary: 'Add User to Team' + description: 'Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.' + operationId: teamAddMember + parameters: + - + name: team_id + in: query + description: 'The id of the team.' + required: false + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamUpdateRequest' + $ref: '#/components/schemas/TeamAddMemberRequest' examples: - default_example: - $ref: '#/components/examples/TeamUpdateRequestDefaultExample' + email_address: + $ref: '#/components/examples/TeamAddMemberRequestEmailAddressExample' + account_id: + $ref: '#/components/examples/TeamAddMemberRequestAccountIdExample' responses: 200: description: 'successful operation' @@ -3905,7 +4019,7 @@ paths: $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamUpdateResponseExample' + $ref: '#/components/examples/TeamAddMemberResponseExample' 4XX: description: failed_operation content: @@ -3921,6 +4035,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -3934,62 +4050,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamUpdate.php + $ref: examples/TeamAddMember.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamUpdate.cs + $ref: examples/TeamAddMember.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamUpdate.js + $ref: examples/TeamAddMember.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamUpdate.ts + $ref: examples/TeamAddMember.ts - lang: Java label: Java source: - $ref: examples/TeamUpdate.java + $ref: examples/TeamAddMember.java - lang: Ruby label: Ruby source: - $ref: examples/TeamUpdate.rb + $ref: examples/TeamAddMember.rb - lang: Python label: Python source: - $ref: examples/TeamUpdate.py + $ref: examples/TeamAddMember.py - lang: cURL label: cURL source: - $ref: examples/TeamUpdate.sh + $ref: examples/TeamAddMember.sh x-meta: seo: - title: 'Update Team | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' - /team/info: - get: + title: 'Add User to Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to invite a specified user to your Team, click here.' + /team/create: + post: tags: - Team - summary: 'Get Team Info' - description: 'Provides information about a team.' - operationId: teamInfo - parameters: - - - name: team_id - in: query - description: 'The id of the team.' - required: false - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + summary: 'Create Team' + description: 'Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.' + operationId: teamCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TeamCreateRequest' + examples: + default_example: + $ref: '#/components/examples/TeamCreateRequestDefaultExample' responses: 200: description: 'successful operation' @@ -4003,10 +4119,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamGetInfoResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamGetInfoResponseExample' + $ref: '#/components/examples/TeamCreateResponseExample' 4XX: description: failed_operation content: @@ -4022,10 +4138,6 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4039,61 +4151,53 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamInfo.php + $ref: examples/TeamCreate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInfo.cs + $ref: examples/TeamCreate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamInfo.js + $ref: examples/TeamCreate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInfo.ts + $ref: examples/TeamCreate.ts - lang: Java label: Java source: - $ref: examples/TeamInfo.java + $ref: examples/TeamCreate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInfo.rb + $ref: examples/TeamCreate.rb - lang: Python label: Python source: - $ref: examples/TeamInfo.py + $ref: examples/TeamCreate.py - lang: cURL label: cURL source: - $ref: examples/TeamInfo.sh + $ref: examples/TeamCreate.sh x-meta: seo: - title: 'Get Team Info | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' - /team/invites: - get: + title: 'Create Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API allows you to build custom eSign integrations. To find out how to create a new team and make yourself a member, click here.' + /team/destroy: + delete: tags: - Team - summary: 'List Team Invites' - description: 'Provides a list of team invites (and their roles).' - operationId: teamInvites - parameters: - - - name: email_address - in: query - description: 'The email address for which to display the team invites.' - required: false - schema: - type: string + summary: 'Delete Team' + description: 'Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).' + operationId: teamDelete responses: 200: description: 'successful operation' @@ -4104,13 +4208,6 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' - content: - application/json: - schema: - $ref: '#/components/schemas/TeamInvitesResponse' - examples: - default_example: - $ref: '#/components/examples/TeamInvitesResponseExample' 4XX: description: failed_operation content: @@ -4133,85 +4230,59 @@ paths: api_key: [] - oauth2: - - account_access - - basic_account_info + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TeamInvites.php + $ref: examples/TeamDelete.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamInvites.cs + $ref: examples/TeamDelete.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamInvites.js + $ref: examples/TeamDelete.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamInvites.ts + $ref: examples/TeamDelete.ts - lang: Java label: Java source: - $ref: examples/TeamInvites.java + $ref: examples/TeamDelete.java - lang: Ruby label: Ruby source: - $ref: examples/TeamInvites.rb + $ref: examples/TeamDelete.rb - lang: Python label: Python source: - $ref: examples/TeamInvites.py + $ref: examples/TeamDelete.py - lang: cURL label: cURL source: - $ref: examples/TeamInvites.sh + $ref: examples/TeamDelete.sh x-meta: seo: - title: 'List Team Invites | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' - '/team/members/{team_id}': + title: 'Delete Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to delete a team you are a member of, click here.' + /team: get: tags: - Team - summary: 'List Team Members' - description: 'Provides a paginated list of members (and their roles) that belong to a given team.' - operationId: teamMembers - parameters: - - - name: team_id - in: path - description: 'The id of the team that a member list is being requested from.' - required: true - schema: - type: string - example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the team member list to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 + summary: 'Get Team' + description: 'Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.' + operationId: teamGet responses: 200: description: 'successful operation' @@ -4225,10 +4296,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamMembersResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamMembersResponseExample' + $ref: '#/components/examples/TeamGetResponseExample' 4XX: description: failed_operation content: @@ -4244,10 +4315,8 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + 404_example: + $ref: '#/components/examples/TeamDoesNotExistResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4261,64 +4330,61 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamMembers.php + $ref: examples/TeamGet.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamMembers.cs + $ref: examples/TeamGet.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamMembers.js + $ref: examples/TeamGet.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamMembers.ts + $ref: examples/TeamGet.ts - lang: Java label: Java source: - $ref: examples/TeamMembers.java + $ref: examples/TeamGet.java - lang: Ruby label: Ruby source: - $ref: examples/TeamMembers.rb + $ref: examples/TeamGet.rb - lang: Python label: Python source: - $ref: examples/TeamMembers.py + $ref: examples/TeamGet.py - lang: cURL label: cURL source: - $ref: examples/TeamMembers.sh + $ref: examples/TeamGet.sh x-meta: seo: - title: 'List Team Members | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' - /team/remove_member: - post: + title: 'Get Team | REST API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to return information about your Team, click here.' + put: tags: - Team - summary: 'Remove User from Team' - description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' - operationId: teamRemoveMember + summary: 'Update Team' + description: 'Updates the name of your Team.' + operationId: teamUpdate requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TeamRemoveMemberRequest' + $ref: '#/components/schemas/TeamUpdateRequest' examples: - email_address: - $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' - account_id: - $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' + default_example: + $ref: '#/components/examples/TeamUpdateRequestDefaultExample' responses: 200: description: 'successful operation' @@ -4335,7 +4401,7 @@ paths: $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TeamRemoveMemberResponseExample' + $ref: '#/components/examples/TeamUpdateResponseExample' 4XX: description: failed_operation content: @@ -4351,8 +4417,6 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4366,78 +4430,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamRemoveMember.php + $ref: examples/TeamUpdate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamRemoveMember.cs + $ref: examples/TeamUpdate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamRemoveMember.js + $ref: examples/TeamUpdate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamRemoveMember.ts + $ref: examples/TeamUpdate.ts - lang: Java label: Java source: - $ref: examples/TeamRemoveMember.java + $ref: examples/TeamUpdate.java - lang: Ruby label: Ruby source: - $ref: examples/TeamRemoveMember.rb + $ref: examples/TeamUpdate.rb - lang: Python label: Python source: - $ref: examples/TeamRemoveMember.py + $ref: examples/TeamUpdate.py - lang: cURL label: cURL source: - $ref: examples/TeamRemoveMember.sh + $ref: examples/TeamUpdate.sh x-meta: seo: - title: 'Remove User from Team | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' - '/team/sub_teams/{team_id}': + title: 'Update Team | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to update the name of your team, click here.' + /team/info: get: tags: - Team - summary: 'List Sub Teams' - description: 'Provides a paginated list of sub teams that belong to a given team.' - operationId: teamSubTeams + summary: 'Get Team Info' + description: 'Provides information about a team.' + operationId: teamInfo parameters: - name: team_id - in: path - description: 'The id of the parent Team.' - required: true + in: query + description: 'The id of the team.' + required: false schema: type: string example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c - - - name: page - in: query - description: 'Which page number of the SubTeam List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 responses: 200: description: 'successful operation' @@ -4451,10 +4499,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamSubTeamsResponse' + $ref: '#/components/schemas/TeamGetInfoResponse' examples: default_example: - $ref: '#/components/examples/TeamSubTeamsResponseExample' + $ref: '#/components/examples/TeamGetInfoResponseExample' 4XX: description: failed_operation content: @@ -4487,71 +4535,61 @@ paths: lang: PHP label: PHP source: - $ref: examples/TeamSubTeams.php + $ref: examples/TeamInfo.php - lang: 'C#' label: 'C#' source: - $ref: examples/TeamSubTeams.cs + $ref: examples/TeamInfo.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TeamSubTeams.js + $ref: examples/TeamInfo.js - lang: TypeScript label: TypeScript source: - $ref: examples/TeamSubTeams.ts + $ref: examples/TeamInfo.ts - lang: Java label: Java source: - $ref: examples/TeamSubTeams.java + $ref: examples/TeamInfo.java - lang: Ruby label: Ruby source: - $ref: examples/TeamSubTeams.rb + $ref: examples/TeamInfo.rb - lang: Python label: Python source: - $ref: examples/TeamSubTeams.py + $ref: examples/TeamInfo.py - lang: cURL label: cURL source: - $ref: examples/TeamSubTeams.sh + $ref: examples/TeamInfo.sh x-meta: seo: - title: 'List Sub Teams | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' - '/template/add_user/{template_id}': - post: + title: 'Get Team Info | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get information about a specific team, click here.' + /team/invites: + get: tags: - - Template - summary: 'Add User to Template' - description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' - operationId: templateAddUser + - Team + summary: 'List Team Invites' + description: 'Provides a list of team invites (and their roles).' + operationId: teamInvites parameters: - - name: template_id - in: path - description: 'The id of the Template to give the Account access to.' - required: true + name: email_address + in: query + description: 'The email address for which to display the team invites.' + required: false schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateAddUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -4565,10 +4603,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/TeamInvitesResponse' examples: default_example: - $ref: '#/components/examples/TemplateAddUserResponseExample' + $ref: '#/components/examples/TeamInvitesResponseExample' 4XX: description: failed_operation content: @@ -4584,8 +4622,6 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4593,77 +4629,85 @@ paths: api_key: [] - oauth2: - - template_access + - account_access + - basic_account_info x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateAddUser.php + $ref: examples/TeamInvites.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateAddUser.cs + $ref: examples/TeamInvites.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateAddUser.js + $ref: examples/TeamInvites.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateAddUser.ts + $ref: examples/TeamInvites.ts - lang: Java label: Java source: - $ref: examples/TemplateAddUser.java + $ref: examples/TeamInvites.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateAddUser.rb + $ref: examples/TeamInvites.rb - lang: Python label: Python source: - $ref: examples/TemplateAddUser.py + $ref: examples/TeamInvites.py - lang: cURL label: cURL source: - $ref: examples/TemplateAddUser.sh + $ref: examples/TeamInvites.sh x-meta: seo: - title: 'Add User to Template | REST API | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' - /template/create: - post: + title: 'List Team Invites | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team invites (and their roles), click here.' + '/team/members/{team_id}': + get: tags: - - Template - summary: 'Create Template' - description: 'Creates a template that can then be used.' - operationId: templateCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateRequest' + - Team + summary: 'List Team Members' + description: 'Provides a paginated list of members (and their roles) that belong to a given team.' + operationId: teamMembers + parameters: + - + name: team_id + in: path + description: 'The id of the team that a member list is being requested from.' + required: true + schema: + type: string + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the team member list to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: 200: description: 'successful operation' @@ -4677,10 +4721,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateResponse' + $ref: '#/components/schemas/TeamMembersResponse' examples: default_example: - $ref: '#/components/examples/TemplateCreateResponseExample' + $ref: '#/components/examples/TeamMembersResponseExample' 4XX: description: failed_operation content: @@ -4696,10 +4740,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4707,79 +4751,72 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreate.php + $ref: examples/TeamMembers.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreate.cs + $ref: examples/TeamMembers.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateCreate.js + $ref: examples/TeamMembers.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreate.ts + $ref: examples/TeamMembers.ts - lang: Java label: Java source: - $ref: examples/TemplateCreate.java + $ref: examples/TeamMembers.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreate.rb + $ref: examples/TeamMembers.rb - lang: Python label: Python source: - $ref: examples/TemplateCreate.py + $ref: examples/TeamMembers.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreate.sh + $ref: examples/TeamMembers.sh x-meta: seo: - title: 'Create Template | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' - /template/create_embedded_draft: + title: 'List Team Members | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of team members and their roles for a specific team, click here.' + /team/remove_member: post: tags: - - Template - summary: 'Create Embedded Template Draft' - description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' - operationId: templateCreateEmbeddedDraft + - Team + summary: 'Remove User from Team' + description: 'Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.' + operationId: teamRemoveMember requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + $ref: '#/components/schemas/TeamRemoveMemberRequest' examples: - default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + email_address: + $ref: '#/components/examples/TeamRemoveMemberRequestEmailAddressExample' + account_id: + $ref: '#/components/examples/TeamRemoveMemberRequestAccountIdExample' responses: - 200: + 201: description: 'successful operation' headers: X-RateLimit-Limit: @@ -4791,10 +4828,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' + $ref: '#/components/schemas/TeamGetResponse' examples: default_example: - $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' + $ref: '#/components/examples/TeamRemoveMemberResponseExample' 4XX: description: failed_operation content: @@ -4812,8 +4849,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4821,68 +4856,84 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateCreateEmbeddedDraft.php + $ref: examples/TeamRemoveMember.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateCreateEmbeddedDraft.cs + $ref: examples/TeamRemoveMember.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateCreateEmbeddedDraft.js + $ref: examples/TeamRemoveMember.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateCreateEmbeddedDraft.ts + $ref: examples/TeamRemoveMember.ts - lang: Java label: Java source: - $ref: examples/TemplateCreateEmbeddedDraft.java + $ref: examples/TeamRemoveMember.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateCreateEmbeddedDraft.rb + $ref: examples/TeamRemoveMember.rb - lang: Python label: Python source: - $ref: examples/TemplateCreateEmbeddedDraft.py + $ref: examples/TeamRemoveMember.py - lang: cURL label: cURL source: - $ref: examples/TemplateCreateEmbeddedDraft.sh + $ref: examples/TeamRemoveMember.sh x-meta: seo: - title: 'Create Embedded Template Draft | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' - '/template/delete/{template_id}': - post: + title: 'Remove User from Team | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to remove a user Account from your Team, click here.' + '/team/sub_teams/{team_id}': + get: tags: - - Template - summary: 'Delete Template' - description: 'Completely deletes the template specified from the account.' - operationId: templateDelete + - Team + summary: 'List Sub Teams' + description: 'Provides a paginated list of sub teams that belong to a given team.' + operationId: teamSubTeams parameters: - - name: template_id + name: team_id in: path - description: 'The id of the Template to delete.' + description: 'The id of the parent Team.' required: true schema: type: string - example: f57db65d3f933b5316d398057a36176831451a35 + example: 4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c + - + name: page + in: query + description: 'Which page number of the SubTeam List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 responses: 200: description: 'successful operation' @@ -4894,7 +4945,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: {} + application/json: + schema: + $ref: '#/components/schemas/TeamSubTeamsResponse' + examples: + default_example: + $ref: '#/components/examples/TeamSubTeamsResponseExample' 4XX: description: failed_operation content: @@ -4910,10 +4966,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -4921,80 +4977,77 @@ paths: api_key: [] - oauth2: - - template_access + - team_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/TemplateDelete.php + $ref: examples/TeamSubTeams.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateDelete.cs + $ref: examples/TeamSubTeams.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateDelete.js + $ref: examples/TeamSubTeams.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateDelete.ts + $ref: examples/TeamSubTeams.ts - lang: Java label: Java source: - $ref: examples/TemplateDelete.java + $ref: examples/TeamSubTeams.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateDelete.rb + $ref: examples/TeamSubTeams.rb - lang: Python label: Python source: - $ref: examples/TemplateDelete.py + $ref: examples/TeamSubTeams.py - lang: cURL label: cURL source: - $ref: examples/TemplateDelete.sh + $ref: examples/TeamSubTeams.sh x-meta: seo: - title: 'Delete Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' - '/template/files/{template_id}': - get: + title: 'List Sub Teams | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you automate your team management. To find out how to get a list of sub teams that exist for a given team, click here.' + '/template/add_user/{template_id}': + post: tags: - Template - summary: 'Get Template Files' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFiles + summary: 'Add User to Template' + description: 'Gives the specified Account access to the specified Template. The specified Account must be a part of your Team.' + operationId: templateAddUser parameters: - name: template_id in: path - description: 'The id of the template files to retrieve.' + description: 'The id of the Template to give the Account access to.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - - - name: file_type - in: query - description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' - schema: - type: string - enum: - - pdf - - zip + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateAddUserRequest' + examples: + default_example: + $ref: '#/components/examples/TemplateAddUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -5006,14 +5059,12 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/pdf: - schema: - type: string - format: binary - application/zip: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/TemplateGetResponse' + examples: + default_example: + $ref: '#/components/examples/TemplateAddUserResponseExample' 4XX: description: failed_operation content: @@ -5031,12 +5082,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5050,84 +5095,90 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFiles.php + $ref: examples/TemplateAddUser.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFiles.cs + $ref: examples/TemplateAddUser.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateFiles.js + $ref: examples/TemplateAddUser.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFiles.ts + $ref: examples/TemplateAddUser.ts - lang: Java label: Java source: - $ref: examples/TemplateFiles.java + $ref: examples/TemplateAddUser.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFiles.rb + $ref: examples/TemplateAddUser.rb - lang: Python label: Python source: - $ref: examples/TemplateFiles.py + $ref: examples/TemplateAddUser.py - lang: cURL label: cURL source: - $ref: examples/TemplateFiles.sh + $ref: examples/TemplateAddUser.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_data_uri/{template_id}': - get: + title: 'Add User to Template | REST API | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to give an Account access to a Template, click here.' + /template/create: + post: tags: - Template - summary: 'Get Template Files as Data Uri' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsDataUri - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 - responses: - 200: - description: 'successful operation' - headers: - X-RateLimit-Limit: - $ref: '#/components/headers/X-RateLimit-Limit' - X-RateLimit-Remaining: - $ref: '#/components/headers/X-RateLimit-Remaining' - X-Ratelimit-Reset: - $ref: '#/components/headers/X-Ratelimit-Reset' - content: - application/json: - schema: - $ref: '#/components/schemas/FileResponseDataUri' - examples: - default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' - 4XX: - description: failed_operation + summary: 'Create Template' + description: 'Creates a template that can then be used.' + operationId: templateCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' + examples: + default_example: + $ref: '#/components/examples/TemplateCreateRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/TemplateCreateRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/TemplateCreateRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/TemplateCreateRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateRequest' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateResponse' + examples: + default_example: + $ref: '#/components/examples/TemplateCreateResponseExample' + 4XX: + description: failed_operation content: application/json: schema: @@ -5145,10 +5196,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5162,72 +5209,71 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsDataUri.php + $ref: examples/TemplateCreate.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsDataUri.cs + $ref: examples/TemplateCreate.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateFilesAsDataUri.js + $ref: examples/TemplateCreate.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsDataUri.ts + $ref: examples/TemplateCreate.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsDataUri.java + $ref: examples/TemplateCreate.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsDataUri.rb + $ref: examples/TemplateCreate.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsDataUri.py + $ref: examples/TemplateCreate.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsDataUri.sh + $ref: examples/TemplateCreate.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/files_as_file_url/{template_id}': - get: + title: 'Create Template | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an template, click here.' + /template/create_embedded_draft: + post: tags: - Template - summary: 'Get Template Files as File Url' - description: |- - Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - - If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - operationId: templateFilesAsFileUrl - parameters: - - - name: template_id - in: path - description: 'The id of the template files to retrieve.' - required: true - schema: - type: string - example: f57db65d3f933b5316d398057a36176831451a35 - - - name: force_download - in: query - description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' - schema: - type: integer - default: 1 + summary: 'Create Embedded Template Draft' + description: 'The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template ''edit'' stage.' + operationId: templateCreateEmbeddedDraft + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' + examples: + default_example: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/TemplateCreateEmbeddedDraftRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftRequest' responses: 200: description: 'successful operation' @@ -5241,10 +5287,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FileResponse' + $ref: '#/components/schemas/TemplateCreateEmbeddedDraftResponse' examples: default_example: - $ref: '#/components/examples/TemplateFilesResponseExample' + $ref: '#/components/examples/TemplateCreateEmbeddedDraftResponseExample' 4XX: description: failed_operation content: @@ -5264,10 +5310,6 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 422_example: - $ref: '#/components/examples/Error422ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5281,58 +5323,58 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateFilesAsFileUrl.php + $ref: examples/TemplateCreateEmbeddedDraft.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateFilesAsFileUrl.cs + $ref: examples/TemplateCreateEmbeddedDraft.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateFilesAsFileUrl.js + $ref: examples/TemplateCreateEmbeddedDraft.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateFilesAsFileUrl.ts + $ref: examples/TemplateCreateEmbeddedDraft.ts - lang: Java label: Java source: - $ref: examples/TemplateFilesAsFileUrl.java + $ref: examples/TemplateCreateEmbeddedDraft.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateFilesAsFileUrl.rb + $ref: examples/TemplateCreateEmbeddedDraft.rb - lang: Python label: Python source: - $ref: examples/TemplateFilesAsFileUrl.py + $ref: examples/TemplateCreateEmbeddedDraft.py - lang: cURL label: cURL source: - $ref: examples/TemplateFilesAsFileUrl.sh + $ref: examples/TemplateCreateEmbeddedDraft.sh x-meta: seo: - title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' - '/template/{template_id}': - get: + title: 'Create Embedded Template Draft | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom eSign integrations. To find out how to create an embedded draft template, click here.' + '/template/delete/{template_id}': + post: tags: - Template - summary: 'Get Template' - description: 'Returns the Template specified by the `template_id` parameter.' - operationId: templateGet + summary: 'Delete Template' + description: 'Completely deletes the template specified from the account.' + operationId: templateDelete parameters: - name: template_id in: path - description: 'The id of the Template to retrieve.' + description: 'The id of the Template to delete.' required: true schema: type: string @@ -5348,12 +5390,7 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: - schema: - $ref: '#/components/schemas/TemplateGetResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateGetResponseExample' + application/json: {} 4XX: description: failed_operation content: @@ -5371,8 +5408,8 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5386,85 +5423,74 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateGet.php + $ref: examples/TemplateDelete.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateGet.cs + $ref: examples/TemplateDelete.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateGet.js + $ref: examples/TemplateDelete.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateGet.ts + $ref: examples/TemplateDelete.ts - lang: Java label: Java source: - $ref: examples/TemplateGet.java + $ref: examples/TemplateDelete.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateGet.rb + $ref: examples/TemplateDelete.rb - lang: Python label: Python source: - $ref: examples/TemplateGet.py + $ref: examples/TemplateDelete.py - lang: cURL label: cURL source: - $ref: examples/TemplateGet.sh + $ref: examples/TemplateDelete.sh x-meta: seo: - title: 'Get Template | API Documentation | Dropbox Sign for Developers' - description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' - /template/list: + title: 'Delete Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to completely delete a template from the account, click here.' + '/template/files/{template_id}': get: tags: - Template - summary: 'List Templates' + summary: 'Get Template Files' description: |- - Returns a list of the Templates that are accessible by you. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. - operationId: templateList + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFiles parameters: - - name: account_id - in: query - description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + name: template_id + in: path + description: 'The id of the template files to retrieve.' + required: true schema: type: string + example: f57db65d3f933b5316d398057a36176831451a35 - - name: page - in: query - description: 'Which page number of the Template List to return. Defaults to `1`.' - schema: - type: integer - default: 1 - - - name: page_size - in: query - description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' - schema: - type: integer - default: 20 - maximum: 100 - minimum: 1 - - - name: query + name: file_type in: query - description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + description: 'Set to `pdf` for a single merged document or `zip` for a collection of individual documents.' schema: type: string + enum: + - pdf + - zip responses: 200: description: 'successful operation' @@ -5476,12 +5502,14 @@ paths: X-Ratelimit-Reset: $ref: '#/components/headers/X-Ratelimit-Reset' content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/TemplateListResponse' - examples: - default_example: - $ref: '#/components/examples/TemplateListResponseExample' + type: string + format: binary + application/zip: + schema: + type: string + format: binary 4XX: description: failed_operation content: @@ -5497,8 +5525,12 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 422_example: + $ref: '#/components/examples/Error422ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -5514,71 +5546,65 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateList.php + $ref: examples/TemplateFiles.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateList.cs + $ref: examples/TemplateFiles.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateList.js + $ref: examples/TemplateFiles.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateList.ts + $ref: examples/TemplateFiles.ts - lang: Java label: Java source: - $ref: examples/TemplateList.java + $ref: examples/TemplateFiles.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateList.rb + $ref: examples/TemplateFiles.rb - lang: Python label: Python source: - $ref: examples/TemplateList.py + $ref: examples/TemplateFiles.py - lang: cURL label: cURL source: - $ref: examples/TemplateList.sh + $ref: examples/TemplateFiles.sh x-meta: seo: - title: 'List Templates | API Documentation | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' - '/template/remove_user/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_data_uri/{template_id}': + get: tags: - Template - summary: 'Remove User from Template' - description: 'Removes the specified Account''s access to the specified Template.' - operationId: templateRemoveUser + summary: 'Get Template Files as Data Uri' + description: |- + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsDataUri parameters: - name: template_id in: path - description: 'The id of the Template to remove the Account''s access to.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateRemoveUserRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -5592,10 +5618,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateGetResponse' + $ref: '#/components/schemas/FileResponseDataUri' examples: default_example: - $ref: '#/components/examples/TemplateRemoveUserResponseExample' + $ref: '#/components/examples/TemplateFilesResponseExample' 4XX: description: failed_operation content: @@ -5613,6 +5639,12 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 422_example: + $ref: '#/components/examples/Error422ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5626,86 +5658,72 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateRemoveUser.php + $ref: examples/TemplateFilesAsDataUri.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateRemoveUser.cs + $ref: examples/TemplateFilesAsDataUri.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateRemoveUser.js + $ref: examples/TemplateFilesAsDataUri.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateRemoveUser.ts + $ref: examples/TemplateFilesAsDataUri.ts - lang: Java label: Java source: - $ref: examples/TemplateRemoveUser.java + $ref: examples/TemplateFilesAsDataUri.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateRemoveUser.rb + $ref: examples/TemplateFilesAsDataUri.rb - lang: Python label: Python source: - $ref: examples/TemplateRemoveUser.py + $ref: examples/TemplateFilesAsDataUri.py - lang: cURL label: cURL source: - $ref: examples/TemplateRemoveUser.sh + $ref: examples/TemplateFilesAsDataUri.sh x-meta: seo: - title: 'Remove User from Template | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' - '/template/update_files/{template_id}': - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/files_as_file_url/{template_id}': + get: tags: - Template - summary: 'Update Template Files' + summary: 'Get Template Files as File Url' description: |- - Overlays a new file with the overlay of an existing template. The new file(s) must: - - 1. have the same or higher page count - 2. the same orientation as the file(s) being replaced. - - This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. - - Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. - - It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. + Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). - operationId: templateUpdateFiles + If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + operationId: templateFilesAsFileUrl parameters: - name: template_id in: path - description: 'The ID of the template whose files to update.' + description: 'The id of the template files to retrieve.' required: true schema: type: string example: f57db65d3f933b5316d398057a36176831451a35 - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' - examples: - default_example: - $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/TemplateUpdateFilesRequest' + - + name: force_download + in: query + description: 'By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.' + schema: + type: integer + default: 1 responses: 200: description: 'successful operation' @@ -5719,10 +5737,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateUpdateFilesResponse' + $ref: '#/components/schemas/FileResponse' examples: default_example: - $ref: '#/components/examples/TemplateUpdateFilesResponseExample' + $ref: '#/components/examples/TemplateFilesResponseExample' 4XX: description: failed_operation content: @@ -5742,6 +5760,8 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 422_example: + $ref: '#/components/examples/Error422ResponseExample' 429_example: $ref: '#/components/examples/Error429ResponseExample' 4XX_example: @@ -5757,71 +5777,62 @@ paths: lang: PHP label: PHP source: - $ref: examples/TemplateUpdateFiles.php + $ref: examples/TemplateFilesAsFileUrl.php - lang: 'C#' label: 'C#' source: - $ref: examples/TemplateUpdateFiles.cs + $ref: examples/TemplateFilesAsFileUrl.cs - lang: JavaScript label: JavaScript source: - $ref: examples/TemplateUpdateFiles.js + $ref: examples/TemplateFilesAsFileUrl.js - lang: TypeScript label: TypeScript source: - $ref: examples/TemplateUpdateFiles.ts + $ref: examples/TemplateFilesAsFileUrl.ts - lang: Java label: Java source: - $ref: examples/TemplateUpdateFiles.java + $ref: examples/TemplateFilesAsFileUrl.java - lang: Ruby label: Ruby source: - $ref: examples/TemplateUpdateFiles.rb + $ref: examples/TemplateFilesAsFileUrl.rb - lang: Python label: Python source: - $ref: examples/TemplateUpdateFiles.py + $ref: examples/TemplateFilesAsFileUrl.py - lang: cURL label: cURL source: - $ref: examples/TemplateUpdateFiles.sh + $ref: examples/TemplateFilesAsFileUrl.sh x-meta: seo: - title: 'Update Template Files | REST API | Dropbox Sign for Developers' - description: 'Overlays a new file with the overlay of an existing template' - /unclaimed_draft/create: - post: + title: 'Get Template Files | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to get a copy of the current specified documents, click here.' + '/template/{template_id}': + get: tags: - - 'Unclaimed Draft' - summary: 'Create Unclaimed Draft' - description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' - operationId: unclaimedDraftCreate - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + - Template + summary: 'Get Template' + description: 'Returns the Template specified by the `template_id` parameter.' + operationId: templateGet + parameters: + - + name: template_id + in: path + description: 'The id of the Template to retrieve.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 responses: 200: description: 'successful operation' @@ -5835,10 +5846,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' + $ref: '#/components/examples/TemplateGetResponseExample' 4XX: description: failed_operation content: @@ -5854,6 +5865,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5861,80 +5876,91 @@ paths: api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreate.php + $ref: examples/TemplateGet.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreate.cs + $ref: examples/TemplateGet.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftCreate.js + $ref: examples/TemplateGet.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreate.ts + $ref: examples/TemplateGet.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreate.java + $ref: examples/TemplateGet.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreate.rb + $ref: examples/TemplateGet.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreate.py + $ref: examples/TemplateGet.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreate.sh + $ref: examples/TemplateGet.sh x-meta: seo: - title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' - /unclaimed_draft/create_embedded: - post: + title: 'Get Template | API Documentation | Dropbox Sign for Developers' + description: 'The RESTful Dropbox Sign API easily allows you to build custom integrations. To find out how to return the Template specified by the `template_id` parameter, click here.' + /template/list: + get: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft' + - Template + summary: 'List Templates' description: |- - Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + Returns a list of the Templates that are accessible by you. - **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbedded - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' - examples: - default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' - form_fields_per_document: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' - form_field_groups: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' - form_field_rules: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + operationId: templateList + parameters: + - + name: account_id + in: query + description: 'Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.' + schema: + type: string + - + name: page + in: query + description: 'Which page number of the Template List to return. Defaults to `1`.' + schema: + type: integer + default: 1 + - + name: page_size + in: query + description: 'Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.' + schema: + type: integer + default: 20 + maximum: 100 + minimum: 1 + - + name: query + in: query + description: 'String that includes search terms and/or fields to be used to filter the Template objects.' + schema: + type: string responses: 200: description: 'successful operation' @@ -5948,10 +5974,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateListResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' + $ref: '#/components/examples/TemplateListResponseExample' 4XX: description: failed_operation content: @@ -5967,10 +5993,10 @@ paths: $ref: '#/components/examples/Error402ResponseExample' 403_example: $ref: '#/components/examples/Error403ResponseExample' - 404_example: - $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -5978,75 +6004,77 @@ paths: api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbedded.php + $ref: examples/TemplateList.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbedded.cs + $ref: examples/TemplateList.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.js + $ref: examples/TemplateList.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbedded.ts + $ref: examples/TemplateList.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbedded.java + $ref: examples/TemplateList.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbedded.rb + $ref: examples/TemplateList.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbedded.py + $ref: examples/TemplateList.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbedded.sh + $ref: examples/TemplateList.sh x-meta: seo: - title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' - /unclaimed_draft/create_embedded_with_template: + title: 'List Templates | API Documentation | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to return a list of the Templates that can be accessed by you, click here.' + '/template/remove_user/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Create Embedded Unclaimed Draft with Template' - description: |- - Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - - **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftCreateEmbeddedWithTemplate + - Template + summary: 'Remove User from Template' + description: 'Removes the specified Account''s access to the specified Template.' + operationId: templateRemoveUser + parameters: + - + name: template_id + in: path + description: 'The id of the Template to remove the Account''s access to.' + required: true + schema: + type: string + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + $ref: '#/components/schemas/TemplateRemoveUserRequest' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' - multipart/form-data: - schema: - $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + $ref: '#/components/examples/TemplateRemoveUserRequestDefaultExample' responses: 200: description: 'successful operation' @@ -6060,10 +6088,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateGetResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' + $ref: '#/components/examples/TemplateRemoveUserResponseExample' 4XX: description: failed_operation content: @@ -6081,10 +6109,6 @@ paths: $ref: '#/components/examples/Error403ResponseExample' 404_example: $ref: '#/components/examples/Error404ResponseExample' - 409_example: - $ref: '#/components/examples/Error409ResponseExample' - 429_example: - $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -6092,80 +6116,92 @@ paths: api_key: [] - oauth2: - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + $ref: examples/TemplateRemoveUser.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs + $ref: examples/TemplateRemoveUser.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + $ref: examples/TemplateRemoveUser.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + $ref: examples/TemplateRemoveUser.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + $ref: examples/TemplateRemoveUser.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + $ref: examples/TemplateRemoveUser.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + $ref: examples/TemplateRemoveUser.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + $ref: examples/TemplateRemoveUser.sh x-meta: seo: - title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' - '/unclaimed_draft/edit_and_resend/{signature_request_id}': + title: 'Remove User from Template | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to remove a specified Account''s access to a Template, click here.' + '/template/update_files/{template_id}': post: tags: - - 'Unclaimed Draft' - summary: 'Edit and Resend Unclaimed Draft' + - Template + summary: 'Update Template Files' description: |- - Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + Overlays a new file with the overlay of an existing template. The new file(s) must: - **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - operationId: unclaimedDraftEditAndResend + 1. have the same or higher page count + 2. the same orientation as the file(s) being replaced. + + This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. + + Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. + + It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. + + If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + operationId: templateUpdateFiles parameters: - - name: signature_request_id + name: template_id in: path - description: 'The ID of the signature request to edit and resend.' + description: 'The ID of the template whose files to update.' required: true schema: type: string - example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + example: f57db65d3f933b5316d398057a36176831451a35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + $ref: '#/components/schemas/TemplateUpdateFilesRequest' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + $ref: '#/components/examples/TemplateUpdateFilesRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/TemplateUpdateFilesRequest' responses: 200: description: 'successful operation' @@ -6179,10 +6215,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + $ref: '#/components/schemas/TemplateUpdateFilesResponse' examples: default_example: - $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' + $ref: '#/components/examples/TemplateUpdateFilesResponseExample' 4XX: description: failed_operation content: @@ -6202,8 +6238,8 @@ paths: $ref: '#/components/examples/Error404ResponseExample' 409_example: $ref: '#/components/examples/Error409ResponseExample' - 410_example: - $ref: '#/components/examples/Error410ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' 4XX_example: $ref: '#/components/examples/Error4XXResponseExample' security: @@ -6211,157 +6247,617 @@ paths: api_key: [] - oauth2: - - request_signature - - signature_request_access + - template_access x-codeSamples: - lang: PHP label: PHP source: - $ref: examples/UnclaimedDraftEditAndResend.php + $ref: examples/TemplateUpdateFiles.php - lang: 'C#' label: 'C#' source: - $ref: examples/UnclaimedDraftEditAndResend.cs + $ref: examples/TemplateUpdateFiles.cs - lang: JavaScript label: JavaScript source: - $ref: examples/UnclaimedDraftEditAndResend.js + $ref: examples/TemplateUpdateFiles.js - lang: TypeScript label: TypeScript source: - $ref: examples/UnclaimedDraftEditAndResend.ts + $ref: examples/TemplateUpdateFiles.ts - lang: Java label: Java source: - $ref: examples/UnclaimedDraftEditAndResend.java + $ref: examples/TemplateUpdateFiles.java - lang: Ruby label: Ruby source: - $ref: examples/UnclaimedDraftEditAndResend.rb + $ref: examples/TemplateUpdateFiles.rb - lang: Python label: Python source: - $ref: examples/UnclaimedDraftEditAndResend.py + $ref: examples/TemplateUpdateFiles.py - lang: cURL label: cURL source: - $ref: examples/UnclaimedDraftEditAndResend.sh + $ref: examples/TemplateUpdateFiles.sh x-meta: seo: - title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' - description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' -components: - schemas: - AccountCreateRequest: - required: - - email_address - properties: - client_id: - description: |- - Used when creating a new account with OAuth authorization. - - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - client_secret: - description: |- - Used when creating a new account with OAuth authorization. - - See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - type: string - email_address: - description: 'The email address which will be associated with the new Account.' - type: string - format: email - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountUpdateRequest: - properties: - account_id: - description: 'The ID of the Account' - type: string - nullable: true - callback_url: - description: 'The URL that Dropbox Sign should POST events to.' - type: string - locale: - description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' - type: string - type: object - AccountVerifyRequest: - required: - - email_address - properties: - email_address: - description: 'Email address to run the verification for.' - type: string - format: email - type: object - ApiAppCreateRequest: - required: - - name - - domains - properties: - callback_url: - description: 'The URL at which the ApiApp should receive event callbacks.' - type: string - custom_logo_file: - description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' - type: string - format: binary - domains: - description: 'The domain names the ApiApp will be associated with.' - type: array - items: - type: string - maxItems: 2 - minItems: 1 - name: - description: 'The name you want to assign to the ApiApp.' - type: string - oauth: - $ref: '#/components/schemas/SubOAuth' - options: - $ref: '#/components/schemas/SubOptions' - white_labeling_options: - $ref: '#/components/schemas/SubWhiteLabelingOptions' - type: object - ApiAppUpdateRequest: - properties: - callback_url: - description: 'The URL at which the API App should receive event callbacks.' - type: string - custom_logo_file: - description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' - type: string - format: binary - domains: - description: 'The domain names the ApiApp will be associated with.' - type: array - items: - type: string - maxItems: 2 - name: - description: 'The name you want to assign to the ApiApp.' - type: string - oauth: - $ref: '#/components/schemas/SubOAuth' - options: - $ref: '#/components/schemas/SubOptions' - white_labeling_options: - $ref: '#/components/schemas/SubWhiteLabelingOptions' - type: object - EmbeddedEditUrlRequest: - properties: + title: 'Update Template Files | REST API | Dropbox Sign for Developers' + description: 'Overlays a new file with the overlay of an existing template' + /unclaimed_draft/create: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Unclaimed Draft' + description: 'Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404.' + operationId: unclaimedDraftCreate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/UnclaimedDraftCreateRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateRequest' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreate.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreate.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftCreate.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreate.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreate.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreate.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreate.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreate.sh + x-meta: + seo: + title: 'Create Unclaimed Draft | REST API | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build eSign integrations. To find out how to create a new Signature Request Draft that can be claimed using the claim URL, click here.' + /unclaimed_draft/create_embedded: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft' + description: |- + Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + + **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbedded + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestDefaultExample' + form_fields_per_document: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldsPerDocumentExample' + form_field_groups: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldGroupsExample' + form_field_rules: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedRequestFormFieldRulesExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedRequest' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbedded.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbedded.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftCreateEmbedded.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbedded.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbedded.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbedded.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbedded.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbedded.sh + x-meta: + seo: + title: 'Create Embedded Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API allows you to build custom integrations. To find out how to create and embed a the creation of a Signature Request in an iFrame, click here.' + /unclaimed_draft/create_embedded_with_template: + post: + tags: + - 'Unclaimed Draft' + summary: 'Create Embedded Unclaimed Draft with Template' + description: |- + Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + + **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftCreateEmbeddedWithTemplate + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateRequestDefaultExample' + multipart/form-data: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateEmbeddedWithTemplateRequest' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftCreateEmbeddedWithTemplateResponseExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 429_example: + $ref: '#/components/examples/Error429ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + - + oauth2: + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftCreateEmbeddedWithTemplate.sh + x-meta: + seo: + title: 'Embed Unclaimed Draft with Template | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new Draft with a previously saved template, click here.' + '/unclaimed_draft/edit_and_resend/{signature_request_id}': + post: + tags: + - 'Unclaimed Draft' + summary: 'Edit and Resend Unclaimed Draft' + description: |- + Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + + **NOTE**: Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + operationId: unclaimedDraftEditAndResend + parameters: + - + name: signature_request_id + in: path + description: 'The ID of the signature request to edit and resend.' + required: true + schema: + type: string + example: fa5c8a0b0f492d768749333ad6fcc214c111e967 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftEditAndResendRequest' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendRequestDefaultExample' + responses: + 200: + description: 'successful operation' + headers: + X-RateLimit-Limit: + $ref: '#/components/headers/X-RateLimit-Limit' + X-RateLimit-Remaining: + $ref: '#/components/headers/X-RateLimit-Remaining' + X-Ratelimit-Reset: + $ref: '#/components/headers/X-Ratelimit-Reset' + content: + application/json: + schema: + $ref: '#/components/schemas/UnclaimedDraftCreateResponse' + examples: + default_example: + $ref: '#/components/examples/UnclaimedDraftEditAndResendExample' + 4XX: + description: failed_operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + 400_example: + $ref: '#/components/examples/Error400ResponseExample' + 401_example: + $ref: '#/components/examples/Error401ResponseExample' + 402_example: + $ref: '#/components/examples/Error402ResponseExample' + 403_example: + $ref: '#/components/examples/Error403ResponseExample' + 404_example: + $ref: '#/components/examples/Error404ResponseExample' + 409_example: + $ref: '#/components/examples/Error409ResponseExample' + 410_example: + $ref: '#/components/examples/Error410ResponseExample' + 4XX_example: + $ref: '#/components/examples/Error4XXResponseExample' + security: + - + api_key: [] + - + oauth2: + - request_signature + - signature_request_access + x-codeSamples: + - + lang: PHP + label: PHP + source: + $ref: examples/UnclaimedDraftEditAndResend.php + - + lang: 'C#' + label: 'C#' + source: + $ref: examples/UnclaimedDraftEditAndResend.cs + - + lang: JavaScript + label: JavaScript + source: + $ref: examples/UnclaimedDraftEditAndResend.js + - + lang: TypeScript + label: TypeScript + source: + $ref: examples/UnclaimedDraftEditAndResend.ts + - + lang: Java + label: Java + source: + $ref: examples/UnclaimedDraftEditAndResend.java + - + lang: Ruby + label: Ruby + source: + $ref: examples/UnclaimedDraftEditAndResend.rb + - + lang: Python + label: Python + source: + $ref: examples/UnclaimedDraftEditAndResend.py + - + lang: cURL + label: cURL + source: + $ref: examples/UnclaimedDraftEditAndResend.sh + x-meta: + seo: + title: 'Edit and Resend Unclaimed Draft | Dropbox Sign for Developers' + description: 'The Dropbox Sign API easily allows you to build custom integrations. To find out how to create a new signature request from an embedded request, click here.' +components: + schemas: + AccountCreateRequest: + required: + - email_address + properties: + client_id: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + client_secret: + description: |- + Used when creating a new account with OAuth authorization. + + See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) + type: string + email_address: + description: 'The email address which will be associated with the new Account.' + type: string + format: email + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountUpdateRequest: + properties: + account_id: + description: 'The ID of the Account' + type: string + nullable: true + callback_url: + description: 'The URL that Dropbox Sign should POST events to.' + type: string + locale: + description: 'The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.' + type: string + type: object + AccountVerifyRequest: + required: + - email_address + properties: + email_address: + description: 'Email address to run the verification for.' + type: string + format: email + type: object + ApiAppCreateRequest: + required: + - name + - domains + properties: + callback_url: + description: 'The URL at which the ApiApp should receive event callbacks.' + type: string + custom_logo_file: + description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' + type: string + format: binary + domains: + description: 'The domain names the ApiApp will be associated with.' + type: array + items: + type: string + maxItems: 2 + minItems: 1 + name: + description: 'The name you want to assign to the ApiApp.' + type: string + oauth: + $ref: '#/components/schemas/SubOAuth' + options: + $ref: '#/components/schemas/SubOptions' + white_labeling_options: + $ref: '#/components/schemas/SubWhiteLabelingOptions' + type: object + ApiAppUpdateRequest: + properties: + callback_url: + description: 'The URL at which the API App should receive event callbacks.' + type: string + custom_logo_file: + description: 'An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)' + type: string + format: binary + domains: + description: 'The domain names the ApiApp will be associated with.' + type: array + items: + type: string + maxItems: 2 + name: + description: 'The name you want to assign to the ApiApp.' + type: string + oauth: + $ref: '#/components/schemas/SubOAuth' + options: + $ref: '#/components/schemas/SubOptions' + white_labeling_options: + $ref: '#/components/schemas/SubWhiteLabelingOptions' + type: object + EmbeddedEditUrlRequest: + properties: allow_edit_ccs: description: 'This allows the requester to enable/disable to add or change CC roles when editing the template.' type: boolean @@ -6470,9 +6966,98 @@ components: description: 'The (inclusive) start date for the report data in `MM/DD/YYYY` format.' type: string type: object - SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + SignatureRequestBulkCreateEmbeddedWithTemplateRequest: + required: + - client_id + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + signer_file: + description: |- + `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: + + - `name`: the name of the signer filling the role of RoleName + - `email_address`: email address of the signer filling the role of RoleName + - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) + - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) + + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + + **Note**: Not available in test mode and requires a Standard plan or higher. + - `*_field`: any column with a _field" suffix will be treated as a custom field (optional) + + You may only specify field values here, any other options should be set in the custom_fields request parameter. + + Example CSV: + + ``` + name, email_address, pin, company_field + George, george@example.com, d79a3td, ABC Corp + Mary, mary@example.com, gd9as5b, 123 LLC + ``` + type: string + format: binary + signer_list: + description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + type: array + items: + $ref: '#/components/schemas/SubBulkSignerList' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object + SignatureRequestBulkSendWithTemplateRequest: required: - - client_id - template_ids properties: template_ids: @@ -6489,6 +7074,8 @@ components: - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional) @@ -6518,7 +7105,7 @@ components: items: $ref: '#/components/schemas/SubCC' client_id: - description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' type: string custom_fields: description: |- @@ -6558,52 +7145,299 @@ components: type: string maxLength: 255 type: object - SignatureRequestBulkSendWithTemplateRequest: + SignatureRequestCreateEmbeddedRequest: + required: + - client_id + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. + + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **Note**: Only available for Premium plan. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' + type: array + items: + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: |- + When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + + Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + + For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + type: array + items: + $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + ⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true + type: object + SignatureRequestCreateEmbeddedWithTemplateRequest: required: + - client_id - template_ids + - signers properties: template_ids: description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' type: array items: type: string - signer_file: + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app you''re using to create this embedded signature request. Used for security purposes.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + populate_auto_fill_fields: + description: |- + Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. + + ⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + type: boolean + default: false + type: object + SignatureRequestEditRequest: + properties: + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: description: |- - `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - - - `name`: the name of the signer filling the role of RoleName - - `email_address`: email address of the signer filling the role of RoleName - - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) - - **Note**: Not available in test mode and requires a Standard plan or higher. - - `*_field`: any column with a _field" suffix will be treated as a custom field (optional) + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - You may only specify field values here, any other options should be set in the custom_fields request parameter. + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + signers: + description: |- + Add Signers to your Signature Request. - Example CSV: + This endpoint requires either **signers** or **grouped_signers**, but not both. + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestSigner' + grouped_signers: + description: |- + Add Grouped Signers to your Signature Request. - ``` - name, email_address, pin, company_field - George, george@example.com, d79a3td, ABC Corp - Mary, mary@example.com, gd9as5b, 123 LLC - ``` - type: string - format: binary - signer_list: - description: '`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.' + This endpoint requires either **signers** or **grouped_signers**, but not both. type: array items: - $ref: '#/components/schemas/SubBulkSignerList' + $ref: '#/components/schemas/SubSignatureRequestGroupedSigners' allow_decline: description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' type: boolean default: false - ccs: - description: 'Add CC email recipients. Required when a CC role exists for the Template.' + allow_reassign: + description: |- + Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. + + **Note**: Only available for Premium plan and higher. + type: boolean + default: false + attachments: + description: 'A list describing the attachments' type: array items: - $ref: '#/components/schemas/SubCC' + $ref: '#/components/schemas/SubAttachment' + cc_email_addresses: + description: 'The email addresses that should be CCed.' + type: array + items: + type: string + format: email client_id: description: 'The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.' type: string @@ -6617,6 +7451,63 @@ components: type: array items: $ref: '#/components/schemas/SubCustomField' + field_options: + $ref: '#/components/schemas/SubFieldOptions' + form_field_groups: + description: 'Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldGroup' + form_field_rules: + description: 'Conditional Logic rules for fields defined in `form_fields_per_document`.' + type: array + items: + $ref: '#/components/schemas/SubFormFieldRule' + form_fields_per_document: + description: |- + The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + + **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + + * Text Field use `SubFormFieldsPerDocumentText` + * Dropdown Field use `SubFormFieldsPerDocumentDropdown` + * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` + * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` + * Radio Field use `SubFormFieldsPerDocumentRadio` + * Signature Field use `SubFormFieldsPerDocumentSignature` + * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` + * Initials Field use `SubFormFieldsPerDocumentInitials` + * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` + * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + type: array + items: + $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' + hide_text_tags: + description: |- + Enables automatic Text Tag removal when set to true. + + **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + type: boolean + default: false + is_qualified_signature: + description: |- + Send with a value of `true` if you wish to enable + [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), + which requires a face-to-face call to verify the signer's identity.
+ **Note**: QES is only available on the Premium API plan as an add-on purchase. + Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + deprecated: true + x-hideOn: doc + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false message: description: 'The custom message in the email that will be sent to the signers.' type: string @@ -6629,6 +7520,8 @@ components: type: object maxItems: 10 additionalProperties: {} + signing_options: + $ref: '#/components/schemas/SubSigningOptions' signing_redirect_url: description: 'The URL you want signers redirected to after they successfully sign.' type: string @@ -6644,8 +7537,16 @@ components: description: 'The title you want to assign to the SignatureRequest.' type: string maxLength: 255 + use_text_tags: + description: 'Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.' + type: boolean + default: false + expires_at: + description: 'When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.' + type: integer + nullable: true type: object - SignatureRequestCreateEmbeddedRequest: + SignatureRequestEditEmbeddedRequest: required: - client_id properties: @@ -6797,7 +7698,7 @@ components: type: integer nullable: true type: object - SignatureRequestCreateEmbeddedWithTemplateRequest: + SignatureRequestEditEmbeddedWithTemplateRequest: required: - client_id - template_ids @@ -6881,6 +7782,105 @@ components: type: boolean default: false type: object + SignatureRequestEditWithTemplateRequest: + description: '' + required: + - signers + - template_ids + properties: + template_ids: + description: 'Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.' + type: array + items: + type: string + allow_decline: + description: 'Allows signers to decline to sign a document if `true`. Defaults to `false`.' + type: boolean + default: false + ccs: + description: 'Add CC email recipients. Required when a CC role exists for the Template.' + type: array + items: + $ref: '#/components/schemas/SubCC' + client_id: + description: 'Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.' + type: string + custom_fields: + description: 'An array defining values and options for custom fields. Required when a custom field exists in the Template.' + type: array + items: + $ref: '#/components/schemas/SubCustomField' + files: + description: |- + Use `files[]` to indicate the uploaded file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + format: binary + file_urls: + description: |- + Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. + + This endpoint requires either **files** or **file_urls[]**, but not both. + type: array + items: + type: string + is_qualified_signature: + description: |- + Send with a value of `true` if you wish to enable + [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), + which requires a face-to-face call to verify the signer's identity.
+ **Note**: QES is only available on the Premium API plan as an add-on purchase. + Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + deprecated: true + x-hideOn: doc + is_eid: + description: |- + Send with a value of `true` if you wish to enable + [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), + which requires the signer to verify their identity with an eID provider to sign a document.
+ **Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + type: boolean + default: false + message: + description: 'The custom message in the email that will be sent to the signers.' + type: string + maxLength: 5000 + metadata: + description: |- + Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. + + Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + type: object + maxItems: 10 + additionalProperties: {} + signers: + description: 'Add Signers to your Templated-based Signature Request.' + type: array + items: + $ref: '#/components/schemas/SubSignatureRequestTemplateSigner' + signing_options: + $ref: '#/components/schemas/SubSigningOptions' + signing_redirect_url: + description: 'The URL you want signers redirected to after they successfully sign.' + type: string + subject: + description: 'The subject in the email that will be sent to the signers.' + type: string + maxLength: 255 + test_mode: + description: 'Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.' + type: boolean + default: false + title: + description: 'The title you want to assign to the SignatureRequest.' + type: string + maxLength: 255 + type: object SignatureRequestRemindRequest: required: - email_address @@ -7531,6 +8531,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7583,6 +8584,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7633,6 +8635,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7768,6 +8771,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -7810,6 +8814,7 @@ components: **NOTE**: Font size may be reduced during processing in order to fit the contents within the dimensions of the field. type: integer + default: 12 type: object - $ref: '#/components/schemas/SubFormFieldsPerDocumentBase' @@ -8024,6 +9029,8 @@ components: description: |- An E.164 formatted phone number. + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + **Note**: Not available in test mode and requires a Standard plan or higher. type: string sms_phone_number_type: @@ -8063,6 +9070,8 @@ components: description: |- An E.164 formatted phone number. + By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). + **Note**: Not available in test mode and requires a Standard plan or higher. type: string sms_phone_number_type: @@ -9680,6 +10689,10 @@ components: description: 'The URL you want the signer redirected to after they successfully sign.' type: string nullable: true + final_copy_uri: + description: 'The path where the completed document can be downloaded' + type: string + nullable: true template_ids: description: 'Templates IDs used in this SignatureRequest (if any).' type: array @@ -9713,6 +10726,10 @@ components: type: array items: $ref: '#/components/schemas/SignatureRequestResponseSignatures' + bulk_send_job_id: + description: 'The ID of the Bulk Send job which sent the signature request, if applicable.' + type: string + nullable: true type: object x-internal: true SignatureRequestResponseAttachment: @@ -11208,7 +12225,6 @@ components: - event_time - event_type - event_hash - - event_metadata properties: event_time: description: 'Time the event was created (using Unix time).' @@ -11239,6 +12255,7 @@ components: - template_created - template_error - callback_test + - signature_request_signer_removed event_hash: description: 'Generated hash used to verify source of event data.' type: string @@ -11334,6 +12351,30 @@ components: summary: 'Default Example' value: $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateRequestDefaultExample.json + SignatureRequestEditRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditRequestDefaultExample.json + SignatureRequestEditRequestGroupedSignersExample: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditRequestGroupedSignersExample.json + SignatureRequestEditEmbeddedRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedRequestDefaultExample.json + SignatureRequestEditEmbeddedRequestGroupedSignersExample: + summary: 'Grouped Signers Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedRequestGroupedSignersExample.json + SignatureRequestEditEmbeddedWithTemplateRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateRequestDefaultExample.json + SignatureRequestEditWithTemplateRequestDefaultExample: + summary: 'Default Example' + value: + $ref: examples/json/SignatureRequestEditWithTemplateRequestDefaultExample.json SignatureRequestRemindRequestDefaultExample: summary: 'Default Example' value: @@ -11582,10 +12623,18 @@ components: summary: 'Create Embedded Signature Request' value: $ref: examples/json/SignatureRequestCreateEmbeddedResponseExample.json + SignatureRequestEditEmbeddedResponseExample: + summary: 'Edit Embedded Signature Request' + value: + $ref: examples/json/SignatureRequestEditEmbeddedResponseExample.json SignatureRequestCreateEmbeddedWithTemplateResponseExample: summary: 'Create Embedded Signature Request With Template' value: $ref: examples/json/SignatureRequestCreateEmbeddedWithTemplateResponseExample.json + SignatureRequestEditEmbeddedWithTemplateResponseExample: + summary: 'Edit Embedded Signature Request With Template' + value: + $ref: examples/json/SignatureRequestEditEmbeddedWithTemplateResponseExample.json SignatureRequestFilesResponseExample: summary: 'Signature Requests Files' value: @@ -11602,10 +12651,18 @@ components: summary: 'Send Signature Request' value: $ref: examples/json/SignatureRequestSendResponseExample.json + SignatureRequestEditResponseExample: + summary: 'Edit Signature Request' + value: + $ref: examples/json/SignatureRequestEditResponseExample.json SignatureRequestSendWithTemplateResponseExample: summary: 'Send Signature Request With Template' value: $ref: examples/json/SignatureRequestSendWithTemplateResponseExample.json + SignatureRequestEditWithTemplateResponseExample: + summary: 'Edit Signature Request With Template' + value: + $ref: examples/json/SignatureRequestEditWithTemplateResponseExample.json SignatureRequestUpdateResponseExample: summary: 'Signature Request Update' value: diff --git a/src/Api/ApiAppApi.php b/src/Api/ApiAppApi.php index b36781c..2f158ac 100644 --- a/src/Api/ApiAppApi.php +++ b/src/Api/ApiAppApi.php @@ -200,7 +200,7 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea $statusCode = $response->getStatusCode(); - if ($statusCode === 200) { + if ($statusCode === 201) { if ('\Dropbox\Sign\Model\ApiAppGetResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -245,7 +245,7 @@ public function apiAppCreateWithHttpInfo(Model\ApiAppCreateRequest $api_app_crea } catch (ApiException $e) { $statusCode = $e->getCode(); - if ($statusCode === 200) { + if ($statusCode === 201) { $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Dropbox\Sign\Model\ApiAppGetResponse', diff --git a/src/Api/SignatureRequestApi.php b/src/Api/SignatureRequestApi.php index 3de87a5..8344760 100644 --- a/src/Api/SignatureRequestApi.php +++ b/src/Api/SignatureRequestApi.php @@ -1648,6 +1648,1358 @@ public function signatureRequestCreateEmbeddedWithTemplateRequest(Model\Signatur ); } + /** + * Operation signatureRequestEdit + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request signature_request_edit_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\SignatureRequestGetResponse + */ + public function signatureRequestEdit(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request) + { + list($response) = $this->signatureRequestEditWithHttpInfo($signature_request_id, $signature_request_edit_request); + + return $response; + } + + /** + * Operation signatureRequestEditWithHttpInfo + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function signatureRequestEditWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request) + { + $request = $this->signatureRequestEditRequest($signature_request_id, $signature_request_edit_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation signatureRequestEditAsync + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditAsync(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request) + { + return $this->signatureRequestEditAsyncWithHttpInfo($signature_request_id, $signature_request_edit_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditAsyncWithHttpInfo + * + * Edit Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditRequest($signature_request_id, $signature_request_edit_request); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEdit' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditRequest $signature_request_edit_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function signatureRequestEditRequest(string $signature_request_id, Model\SignatureRequestEditRequest $signature_request_edit_request) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEdit' + ); + } + // verify the required parameter 'signature_request_edit_request' is set + if ($signature_request_edit_request === null || (is_array($signature_request_edit_request) && count($signature_request_edit_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_request when calling signatureRequestEdit' + ); + } + + $resourcePath = '/signature_request/edit/{signature_request_id}'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{' . 'signature_request_id' . '}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json', 'multipart/form-data'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_request)); + } else { + $httpBody = $signature_request_edit_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditEmbedded + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request signature_request_edit_embedded_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\SignatureRequestGetResponse + */ + public function signatureRequestEditEmbedded(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request) + { + list($response) = $this->signatureRequestEditEmbeddedWithHttpInfo($signature_request_id, $signature_request_edit_embedded_request); + + return $response; + } + + /** + * Operation signatureRequestEditEmbeddedWithHttpInfo + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function signatureRequestEditEmbeddedWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request) + { + $request = $this->signatureRequestEditEmbeddedRequest($signature_request_id, $signature_request_edit_embedded_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation signatureRequestEditEmbeddedAsync + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditEmbeddedAsync(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request) + { + return $this->signatureRequestEditEmbeddedAsyncWithHttpInfo($signature_request_id, $signature_request_edit_embedded_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditEmbeddedAsyncWithHttpInfo + * + * Edit Embedded Signature Request + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditEmbeddedAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditEmbeddedRequest($signature_request_id, $signature_request_edit_embedded_request); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditEmbedded' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function signatureRequestEditEmbeddedRequest(string $signature_request_id, Model\SignatureRequestEditEmbeddedRequest $signature_request_edit_embedded_request) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditEmbedded' + ); + } + // verify the required parameter 'signature_request_edit_embedded_request' is set + if ($signature_request_edit_embedded_request === null || (is_array($signature_request_edit_embedded_request) && count($signature_request_edit_embedded_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_embedded_request when calling signatureRequestEditEmbedded' + ); + } + + $resourcePath = '/signature_request/edit_embedded/{signature_request_id}'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_embedded_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{' . 'signature_request_id' . '}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json', 'multipart/form-data'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_request)); + } else { + $httpBody = $signature_request_edit_embedded_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_embedded_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplate + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request signature_request_edit_embedded_with_template_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\SignatureRequestGetResponse + */ + public function signatureRequestEditEmbeddedWithTemplate(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request) + { + list($response) = $this->signatureRequestEditEmbeddedWithTemplateWithHttpInfo($signature_request_id, $signature_request_edit_embedded_with_template_request); + + return $response; + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateWithHttpInfo + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function signatureRequestEditEmbeddedWithTemplateWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request) + { + $request = $this->signatureRequestEditEmbeddedWithTemplateRequest($signature_request_id, $signature_request_edit_embedded_with_template_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateAsync + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditEmbeddedWithTemplateAsync(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request) + { + return $this->signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo($signature_request_id, $signature_request_edit_embedded_with_template_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo + * + * Edit Embedded Signature Request with Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditEmbeddedWithTemplateAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditEmbeddedWithTemplateRequest($signature_request_id, $signature_request_edit_embedded_with_template_request); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditEmbeddedWithTemplate' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function signatureRequestEditEmbeddedWithTemplateRequest(string $signature_request_id, Model\SignatureRequestEditEmbeddedWithTemplateRequest $signature_request_edit_embedded_with_template_request) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditEmbeddedWithTemplate' + ); + } + // verify the required parameter 'signature_request_edit_embedded_with_template_request' is set + if ($signature_request_edit_embedded_with_template_request === null || (is_array($signature_request_edit_embedded_with_template_request) && count($signature_request_edit_embedded_with_template_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_embedded_with_template_request when calling signatureRequestEditEmbeddedWithTemplate' + ); + } + + $resourcePath = '/signature_request/edit_embedded_with_template/{signature_request_id}'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_embedded_with_template_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{' . 'signature_request_id' . '}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json', 'multipart/form-data'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_embedded_with_template_request)); + } else { + $httpBody = $signature_request_edit_embedded_with_template_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_embedded_with_template_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation signatureRequestEditWithTemplate + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request signature_request_edit_with_template_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return Model\SignatureRequestGetResponse + */ + public function signatureRequestEditWithTemplate(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request) + { + list($response) = $this->signatureRequestEditWithTemplateWithHttpInfo($signature_request_id, $signature_request_edit_with_template_request); + + return $response; + } + + /** + * Operation signatureRequestEditWithTemplateWithHttpInfo + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * + * @throws ApiException on non-2xx response + * @throws InvalidArgumentException + * @return array of Model\SignatureRequestGetResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function signatureRequestEditWithTemplateWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request) + { + $request = $this->signatureRequestEditWithTemplateRequest($signature_request_id, $signature_request_edit_with_template_request); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + $this->response = $response; + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode === 200) { + if ('\Dropbox\Sign\Model\SignatureRequestGetResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\SignatureRequestGetResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + if ('\Dropbox\Sign\Model\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Dropbox\Sign\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + $statusCode = $e->getCode(); + + if ($statusCode === 200) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\SignatureRequestGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + $rangeCodeLeft = (int) (substr('4XX', 0, 1) . '00'); + $rangeCodeRight = (int) (substr('4XX', 0, 1) . '99'); + if ($statusCode >= $rangeCodeLeft && $statusCode <= $rangeCodeRight) { + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Dropbox\Sign\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + } + + throw $e; + } + } + + /** + * Operation signatureRequestEditWithTemplateAsync + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditWithTemplateAsync(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request) + { + return $this->signatureRequestEditWithTemplateAsyncWithHttpInfo($signature_request_id, $signature_request_edit_with_template_request) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation signatureRequestEditWithTemplateAsyncWithHttpInfo + * + * Edit Signature Request With Template + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * + * @throws InvalidArgumentException + * @return Promise\PromiseInterface + */ + public function signatureRequestEditWithTemplateAsyncWithHttpInfo(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request) + { + $returnType = '\Dropbox\Sign\Model\SignatureRequestGetResponse'; + $request = $this->signatureRequestEditWithTemplateRequest($signature_request_id, $signature_request_edit_with_template_request); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'signatureRequestEditWithTemplate' + * + * @param string $signature_request_id The id of the SignatureRequest to edit. (required) + * @param Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request (required) + * + * @throws InvalidArgumentException + * @return Psr7\Request + */ + public function signatureRequestEditWithTemplateRequest(string $signature_request_id, Model\SignatureRequestEditWithTemplateRequest $signature_request_edit_with_template_request) + { + // verify the required parameter 'signature_request_id' is set + if ($signature_request_id === null || (is_array($signature_request_id) && count($signature_request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_id when calling signatureRequestEditWithTemplate' + ); + } + // verify the required parameter 'signature_request_edit_with_template_request' is set + if ($signature_request_edit_with_template_request === null || (is_array($signature_request_edit_with_template_request) && count($signature_request_edit_with_template_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $signature_request_edit_with_template_request when calling signatureRequestEditWithTemplate' + ); + } + + $resourcePath = '/signature_request/edit_with_template/{signature_request_id}'; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + $formParams = ObjectSerializer::getFormParams( + $signature_request_edit_with_template_request + ); + + $multipart = !empty($formParams); + + // path params + if ($signature_request_id !== null) { + $resourcePath = str_replace( + '{' . 'signature_request_id' . '}', + ObjectSerializer::toPathValue($signature_request_id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['multipart/form-data'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json', 'multipart/form-data'] + ); + } + + // for model (json/xml) + if (count($formParams) === 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($signature_request_edit_with_template_request)); + } else { + $httpBody = $signature_request_edit_with_template_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + if (!empty($body)) { + $multipartContents[] = [ + 'name' => 'body', + 'contents' => $body, + 'headers' => ['Content-Type' => 'application/json'], + ]; + } + + if ($payloadHook = $this->config->getPayloadHook()) { + $payloadHook('multipart', $multipartContents, $signature_request_edit_with_template_request); + } + + $httpBody = new Psr7\MultipartStream($multipartContents); + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = Psr7\Query::build($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername())) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ':'); + } + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = Psr7\Query::build($queryParams); + + return new Psr7\Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation signatureRequestFiles * diff --git a/src/Api/TeamApi.php b/src/Api/TeamApi.php index 074013b..c0883aa 100644 --- a/src/Api/TeamApi.php +++ b/src/Api/TeamApi.php @@ -2333,7 +2333,7 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team $statusCode = $response->getStatusCode(); - if ($statusCode === 200) { + if ($statusCode === 201) { if ('\Dropbox\Sign\Model\TeamGetResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -2378,7 +2378,7 @@ public function teamRemoveMemberWithHttpInfo(Model\TeamRemoveMemberRequest $team } catch (ApiException $e) { $statusCode = $e->getCode(); - if ($statusCode === 200) { + if ($statusCode === 201) { $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Dropbox\Sign\Model\TeamGetResponse', diff --git a/src/Configuration.php b/src/Configuration.php index f9ce3c5..b62c93c 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -70,7 +70,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/1.3.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/1.4.0/PHP'; /** * Debug switch (default set to false) @@ -319,7 +319,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 3.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 1.3.0' . PHP_EOL; + $report .= ' SDK Package Version: 1.4.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/src/EventCallbackHelper.php b/src/EventCallbackHelper.php index 31a0fd8..094e770 100644 --- a/src/EventCallbackHelper.php +++ b/src/EventCallbackHelper.php @@ -70,8 +70,10 @@ public static function getCallbackType( ): string { $meta_data = $event_callback->getEvent()->getEventMetadata(); - return !empty($meta_data->getReportedForAppId()) - ? self::EVENT_TYPE_APP_CALLBACK - : self::EVENT_TYPE_ACCOUNT_CALLBACK; + if (empty($meta_data) || empty($meta_data->getReportedForAppId())) { + return self::EVENT_TYPE_ACCOUNT_CALLBACK; + } + + return self::EVENT_TYPE_APP_CALLBACK; } } diff --git a/src/Model/BulkSendJobGetResponseSignatureRequests.php b/src/Model/BulkSendJobGetResponseSignatureRequests.php index 5c98d94..a3cf4a0 100644 --- a/src/Model/BulkSendJobGetResponseSignatureRequests.php +++ b/src/Model/BulkSendJobGetResponseSignatureRequests.php @@ -79,6 +79,7 @@ class BulkSendJobGetResponseSignatureRequests implements ModelInterface, ArrayAc 'details_url' => 'string', 'cc_email_addresses' => 'string[]', 'signing_redirect_url' => 'string', + 'final_copy_uri' => 'string', 'template_ids' => 'string[]', 'custom_fields' => '\Dropbox\Sign\Model\SignatureRequestResponseCustomFieldBase[]', 'attachments' => '\Dropbox\Sign\Model\SignatureRequestResponseAttachment[]', @@ -113,6 +114,7 @@ class BulkSendJobGetResponseSignatureRequests implements ModelInterface, ArrayAc 'details_url' => null, 'cc_email_addresses' => null, 'signing_redirect_url' => null, + 'final_copy_uri' => null, 'template_ids' => null, 'custom_fields' => null, 'attachments' => null, @@ -166,6 +168,7 @@ public static function openAPIFormats() 'details_url' => 'details_url', 'cc_email_addresses' => 'cc_email_addresses', 'signing_redirect_url' => 'signing_redirect_url', + 'final_copy_uri' => 'final_copy_uri', 'template_ids' => 'template_ids', 'custom_fields' => 'custom_fields', 'attachments' => 'attachments', @@ -198,6 +201,7 @@ public static function openAPIFormats() 'details_url' => 'setDetailsUrl', 'cc_email_addresses' => 'setCcEmailAddresses', 'signing_redirect_url' => 'setSigningRedirectUrl', + 'final_copy_uri' => 'setFinalCopyUri', 'template_ids' => 'setTemplateIds', 'custom_fields' => 'setCustomFields', 'attachments' => 'setAttachments', @@ -230,6 +234,7 @@ public static function openAPIFormats() 'details_url' => 'getDetailsUrl', 'cc_email_addresses' => 'getCcEmailAddresses', 'signing_redirect_url' => 'getSigningRedirectUrl', + 'final_copy_uri' => 'getFinalCopyUri', 'template_ids' => 'getTemplateIds', 'custom_fields' => 'getCustomFields', 'attachments' => 'getAttachments', @@ -312,6 +317,7 @@ public function __construct(array $data = null) $this->container['details_url'] = $data['details_url'] ?? null; $this->container['cc_email_addresses'] = $data['cc_email_addresses'] ?? null; $this->container['signing_redirect_url'] = $data['signing_redirect_url'] ?? null; + $this->container['final_copy_uri'] = $data['final_copy_uri'] ?? null; $this->container['template_ids'] = $data['template_ids'] ?? null; $this->container['custom_fields'] = $data['custom_fields'] ?? null; $this->container['attachments'] = $data['attachments'] ?? null; @@ -793,6 +799,30 @@ public function setSigningRedirectUrl(?string $signing_redirect_url) return $this; } + /** + * Gets final_copy_uri + * + * @return string|null + */ + public function getFinalCopyUri() + { + return $this->container['final_copy_uri']; + } + + /** + * Sets final_copy_uri + * + * @param string|null $final_copy_uri The path where the completed document can be downloaded + * + * @return self + */ + public function setFinalCopyUri(?string $final_copy_uri) + { + $this->container['final_copy_uri'] = $final_copy_uri; + + return $this; + } + /** * Gets template_ids * diff --git a/src/Model/EventCallbackRequestEvent.php b/src/Model/EventCallbackRequestEvent.php index ceddff8..0b1ba4d 100644 --- a/src/Model/EventCallbackRequestEvent.php +++ b/src/Model/EventCallbackRequestEvent.php @@ -202,6 +202,7 @@ public function getModelName() public const EVENT_TYPE_TEMPLATE_CREATED = 'template_created'; public const EVENT_TYPE_TEMPLATE_ERROR = 'template_error'; public const EVENT_TYPE_CALLBACK_TEST = 'callback_test'; + public const EVENT_TYPE_SIGNATURE_REQUEST_SIGNER_REMOVED = 'signature_request_signer_removed'; /** * Gets allowable values of the enum @@ -233,6 +234,7 @@ public function getEventTypeAllowableValues() self::EVENT_TYPE_TEMPLATE_CREATED, self::EVENT_TYPE_TEMPLATE_ERROR, self::EVENT_TYPE_CALLBACK_TEST, + self::EVENT_TYPE_SIGNATURE_REQUEST_SIGNER_REMOVED, ]; } @@ -302,9 +304,6 @@ public function listInvalidProperties() if ($this->container['event_hash'] === null) { $invalidProperties[] = "'event_hash' can't be null"; } - if ($this->container['event_metadata'] === null) { - $invalidProperties[] = "'event_metadata' can't be null"; - } return $invalidProperties; } @@ -405,7 +404,7 @@ public function setEventHash(string $event_hash) /** * Gets event_metadata * - * @return EventCallbackRequestEventMetadata + * @return EventCallbackRequestEventMetadata|null */ public function getEventMetadata() { @@ -415,11 +414,11 @@ public function getEventMetadata() /** * Sets event_metadata * - * @param EventCallbackRequestEventMetadata $event_metadata event_metadata + * @param EventCallbackRequestEventMetadata|null $event_metadata event_metadata * * @return self */ - public function setEventMetadata(EventCallbackRequestEventMetadata $event_metadata) + public function setEventMetadata(?EventCallbackRequestEventMetadata $event_metadata) { $this->container['event_metadata'] = $event_metadata; diff --git a/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php b/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php index 01070e0..4b14ef1 100644 --- a/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php +++ b/src/Model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.php @@ -375,7 +375,7 @@ public function getSignerFile() /** * Sets signer_file * - * @param SplFileObject|null $signer_file `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` + * @param SplFileObject|null $signer_file `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` * * @return self */ diff --git a/src/Model/SignatureRequestBulkSendWithTemplateRequest.php b/src/Model/SignatureRequestBulkSendWithTemplateRequest.php index 4048210..b9bc012 100644 --- a/src/Model/SignatureRequestBulkSendWithTemplateRequest.php +++ b/src/Model/SignatureRequestBulkSendWithTemplateRequest.php @@ -348,7 +348,7 @@ public function getSignerFile() /** * Sets signer_file * - * @param SplFileObject|null $signer_file `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` + * @param SplFileObject|null $signer_file `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` * * @return self */ diff --git a/src/Model/SignatureRequestEditEmbeddedRequest.php b/src/Model/SignatureRequestEditEmbeddedRequest.php new file mode 100644 index 0000000..611421e --- /dev/null +++ b/src/Model/SignatureRequestEditEmbeddedRequest.php @@ -0,0 +1,1060 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class SignatureRequestEditEmbeddedRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditEmbeddedRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'client_id' => 'string', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestSigner[]', + 'grouped_signers' => '\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]', + 'allow_decline' => 'bool', + 'allow_reassign' => 'bool', + 'attachments' => '\Dropbox\Sign\Model\SubAttachment[]', + 'cc_email_addresses' => 'string[]', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'field_options' => '\Dropbox\Sign\Model\SubFieldOptions', + 'form_field_groups' => '\Dropbox\Sign\Model\SubFormFieldGroup[]', + 'form_field_rules' => '\Dropbox\Sign\Model\SubFormFieldRule[]', + 'form_fields_per_document' => '\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]', + 'hide_text_tags' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'use_text_tags' => 'bool', + 'populate_auto_fill_fields' => 'bool', + 'expires_at' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'client_id' => null, + 'files' => 'binary', + 'file_urls' => null, + 'signers' => null, + 'grouped_signers' => null, + 'allow_decline' => null, + 'allow_reassign' => null, + 'attachments' => null, + 'cc_email_addresses' => 'email', + 'custom_fields' => null, + 'field_options' => null, + 'form_field_groups' => null, + 'form_field_rules' => null, + 'form_fields_per_document' => null, + 'hide_text_tags' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'use_text_tags' => null, + 'populate_auto_fill_fields' => null, + 'expires_at' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'client_id' => 'client_id', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'signers' => 'signers', + 'grouped_signers' => 'grouped_signers', + 'allow_decline' => 'allow_decline', + 'allow_reassign' => 'allow_reassign', + 'attachments' => 'attachments', + 'cc_email_addresses' => 'cc_email_addresses', + 'custom_fields' => 'custom_fields', + 'field_options' => 'field_options', + 'form_field_groups' => 'form_field_groups', + 'form_field_rules' => 'form_field_rules', + 'form_fields_per_document' => 'form_fields_per_document', + 'hide_text_tags' => 'hide_text_tags', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'use_text_tags' => 'use_text_tags', + 'populate_auto_fill_fields' => 'populate_auto_fill_fields', + 'expires_at' => 'expires_at', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'client_id' => 'setClientId', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'signers' => 'setSigners', + 'grouped_signers' => 'setGroupedSigners', + 'allow_decline' => 'setAllowDecline', + 'allow_reassign' => 'setAllowReassign', + 'attachments' => 'setAttachments', + 'cc_email_addresses' => 'setCcEmailAddresses', + 'custom_fields' => 'setCustomFields', + 'field_options' => 'setFieldOptions', + 'form_field_groups' => 'setFormFieldGroups', + 'form_field_rules' => 'setFormFieldRules', + 'form_fields_per_document' => 'setFormFieldsPerDocument', + 'hide_text_tags' => 'setHideTextTags', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'use_text_tags' => 'setUseTextTags', + 'populate_auto_fill_fields' => 'setPopulateAutoFillFields', + 'expires_at' => 'setExpiresAt', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'client_id' => 'getClientId', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'signers' => 'getSigners', + 'grouped_signers' => 'getGroupedSigners', + 'allow_decline' => 'getAllowDecline', + 'allow_reassign' => 'getAllowReassign', + 'attachments' => 'getAttachments', + 'cc_email_addresses' => 'getCcEmailAddresses', + 'custom_fields' => 'getCustomFields', + 'field_options' => 'getFieldOptions', + 'form_field_groups' => 'getFormFieldGroups', + 'form_field_rules' => 'getFormFieldRules', + 'form_fields_per_document' => 'getFormFieldsPerDocument', + 'hide_text_tags' => 'getHideTextTags', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'use_text_tags' => 'getUseTextTags', + 'populate_auto_fill_fields' => 'getPopulateAutoFillFields', + 'expires_at' => 'getExpiresAt', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['client_id'] = $data['client_id'] ?? null; + $this->container['files'] = $data['files'] ?? null; + $this->container['file_urls'] = $data['file_urls'] ?? null; + $this->container['signers'] = $data['signers'] ?? null; + $this->container['grouped_signers'] = $data['grouped_signers'] ?? null; + $this->container['allow_decline'] = $data['allow_decline'] ?? false; + $this->container['allow_reassign'] = $data['allow_reassign'] ?? false; + $this->container['attachments'] = $data['attachments'] ?? null; + $this->container['cc_email_addresses'] = $data['cc_email_addresses'] ?? null; + $this->container['custom_fields'] = $data['custom_fields'] ?? null; + $this->container['field_options'] = $data['field_options'] ?? null; + $this->container['form_field_groups'] = $data['form_field_groups'] ?? null; + $this->container['form_field_rules'] = $data['form_field_rules'] ?? null; + $this->container['form_fields_per_document'] = $data['form_fields_per_document'] ?? null; + $this->container['hide_text_tags'] = $data['hide_text_tags'] ?? false; + $this->container['message'] = $data['message'] ?? null; + $this->container['metadata'] = $data['metadata'] ?? null; + $this->container['signing_options'] = $data['signing_options'] ?? null; + $this->container['subject'] = $data['subject'] ?? null; + $this->container['test_mode'] = $data['test_mode'] ?? false; + $this->container['title'] = $data['title'] ?? null; + $this->container['use_text_tags'] = $data['use_text_tags'] ?? false; + $this->container['populate_auto_fill_fields'] = $data['populate_auto_fill_fields'] ?? false; + $this->container['expires_at'] = $data['expires_at'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): SignatureRequestEditEmbeddedRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): SignatureRequestEditEmbeddedRequest + { + /** @var SignatureRequestEditEmbeddedRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + SignatureRequestEditEmbeddedRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['client_id'] === null) { + $invalidProperties[] = "'client_id' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets client_id + * + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string $client_id Client id of the app you're using to create this embedded signature request. Used for security purposes. + * + * @return self + */ + public function setClientId(string $client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestSigner[]|null + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestSigner[]|null $signers Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setSigners(?array $signers) + { + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets grouped_signers + * + * @return SubSignatureRequestGroupedSigners[]|null + */ + public function getGroupedSigners() + { + return $this->container['grouped_signers']; + } + + /** + * Sets grouped_signers + * + * @param SubSignatureRequestGroupedSigners[]|null $grouped_signers Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setGroupedSigners(?array $grouped_signers) + { + $this->container['grouped_signers'] = $grouped_signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets allow_reassign + * + * @return bool|null + */ + public function getAllowReassign() + { + return $this->container['allow_reassign']; + } + + /** + * Sets allow_reassign + * + * @param bool|null $allow_reassign Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **Note**: Only available for Premium plan. + * + * @return self + */ + public function setAllowReassign(?bool $allow_reassign) + { + $this->container['allow_reassign'] = $allow_reassign; + + return $this; + } + + /** + * Gets attachments + * + * @return SubAttachment[]|null + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param SubAttachment[]|null $attachments A list describing the attachments + * + * @return self + */ + public function setAttachments(?array $attachments) + { + $this->container['attachments'] = $attachments; + + return $this; + } + + /** + * Gets cc_email_addresses + * + * @return string[]|null + */ + public function getCcEmailAddresses() + { + return $this->container['cc_email_addresses']; + } + + /** + * Sets cc_email_addresses + * + * @param string[]|null $cc_email_addresses the email addresses that should be CCed + * + * @return self + */ + public function setCcEmailAddresses(?array $cc_email_addresses) + { + $this->container['cc_email_addresses'] = $cc_email_addresses; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets field_options + * + * @return SubFieldOptions|null + */ + public function getFieldOptions() + { + return $this->container['field_options']; + } + + /** + * Sets field_options + * + * @param SubFieldOptions|null $field_options field_options + * + * @return self + */ + public function setFieldOptions(?SubFieldOptions $field_options) + { + $this->container['field_options'] = $field_options; + + return $this; + } + + /** + * Gets form_field_groups + * + * @return SubFormFieldGroup[]|null + */ + public function getFormFieldGroups() + { + return $this->container['form_field_groups']; + } + + /** + * Sets form_field_groups + * + * @param SubFormFieldGroup[]|null $form_field_groups Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + * + * @return self + */ + public function setFormFieldGroups(?array $form_field_groups) + { + $this->container['form_field_groups'] = $form_field_groups; + + return $this; + } + + /** + * Gets form_field_rules + * + * @return SubFormFieldRule[]|null + */ + public function getFormFieldRules() + { + return $this->container['form_field_rules']; + } + + /** + * Sets form_field_rules + * + * @param SubFormFieldRule[]|null $form_field_rules conditional Logic rules for fields defined in `form_fields_per_document` + * + * @return self + */ + public function setFormFieldRules(?array $form_field_rules) + { + $this->container['form_field_rules'] = $form_field_rules; + + return $this; + } + + /** + * Gets form_fields_per_document + * + * @return SubFormFieldsPerDocumentBase[]|null + */ + public function getFormFieldsPerDocument() + { + return $this->container['form_fields_per_document']; + } + + /** + * Sets form_fields_per_document + * + * @param SubFormFieldsPerDocumentBase[]|null $form_fields_per_document The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + * + * @return self + */ + public function setFormFieldsPerDocument(?array $form_fields_per_document) + { + $this->container['form_fields_per_document'] = $form_fields_per_document; + + return $this; + } + + /** + * Gets hide_text_tags + * + * @return bool|null + */ + public function getHideTextTags() + { + return $this->container['hide_text_tags']; + } + + /** + * Sets hide_text_tags + * + * @param bool|null $hide_text_tags Enables automatic Text Tag removal when set to true. **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + * + * @return self + */ + public function setHideTextTags(?bool $hide_text_tags) + { + $this->container['hide_text_tags'] = $hide_text_tags; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (!is_null($message) && (mb_strlen($message) > 5000)) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (!is_null($subject) && (mb_strlen($subject) > 255)) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (!is_null($title) && (mb_strlen($title) > 255)) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditEmbeddedRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets use_text_tags + * + * @return bool|null + */ + public function getUseTextTags() + { + return $this->container['use_text_tags']; + } + + /** + * Sets use_text_tags + * + * @param bool|null $use_text_tags Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + * + * @return self + */ + public function setUseTextTags(?bool $use_text_tags) + { + $this->container['use_text_tags'] = $use_text_tags; + + return $this; + } + + /** + * Gets populate_auto_fill_fields + * + * @return bool|null + */ + public function getPopulateAutoFillFields() + { + return $this->container['populate_auto_fill_fields']; + } + + /** + * Sets populate_auto_fill_fields + * + * @param bool|null $populate_auto_fill_fields Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. ⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + * + * @return self + */ + public function setPopulateAutoFillFields(?bool $populate_auto_fill_fields) + { + $this->container['populate_auto_fill_fields'] = $populate_auto_fill_fields; + + return $this; + } + + /** + * Gets expires_at + * + * @return int|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param int|null $expires_at When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * + * @return self + */ + public function setExpiresAt(?int $expires_at) + { + $this->container['expires_at'] = $expires_at; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return scalar|object|array|null returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php b/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php new file mode 100644 index 0000000..d5fe373 --- /dev/null +++ b/src/Model/SignatureRequestEditEmbeddedWithTemplateRequest.php @@ -0,0 +1,796 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class SignatureRequestEditEmbeddedWithTemplateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditEmbeddedWithTemplateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'template_ids' => 'string[]', + 'client_id' => 'string', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]', + 'allow_decline' => 'bool', + 'ccs' => '\Dropbox\Sign\Model\SubCC[]', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'populate_auto_fill_fields' => 'bool', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'template_ids' => null, + 'client_id' => null, + 'signers' => null, + 'allow_decline' => null, + 'ccs' => null, + 'custom_fields' => null, + 'files' => 'binary', + 'file_urls' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'populate_auto_fill_fields' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template_ids' => 'template_ids', + 'client_id' => 'client_id', + 'signers' => 'signers', + 'allow_decline' => 'allow_decline', + 'ccs' => 'ccs', + 'custom_fields' => 'custom_fields', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'populate_auto_fill_fields' => 'populate_auto_fill_fields', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template_ids' => 'setTemplateIds', + 'client_id' => 'setClientId', + 'signers' => 'setSigners', + 'allow_decline' => 'setAllowDecline', + 'ccs' => 'setCcs', + 'custom_fields' => 'setCustomFields', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'populate_auto_fill_fields' => 'setPopulateAutoFillFields', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template_ids' => 'getTemplateIds', + 'client_id' => 'getClientId', + 'signers' => 'getSigners', + 'allow_decline' => 'getAllowDecline', + 'ccs' => 'getCcs', + 'custom_fields' => 'getCustomFields', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'populate_auto_fill_fields' => 'getPopulateAutoFillFields', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['template_ids'] = $data['template_ids'] ?? null; + $this->container['client_id'] = $data['client_id'] ?? null; + $this->container['signers'] = $data['signers'] ?? null; + $this->container['allow_decline'] = $data['allow_decline'] ?? false; + $this->container['ccs'] = $data['ccs'] ?? null; + $this->container['custom_fields'] = $data['custom_fields'] ?? null; + $this->container['files'] = $data['files'] ?? null; + $this->container['file_urls'] = $data['file_urls'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['metadata'] = $data['metadata'] ?? null; + $this->container['signing_options'] = $data['signing_options'] ?? null; + $this->container['subject'] = $data['subject'] ?? null; + $this->container['test_mode'] = $data['test_mode'] ?? false; + $this->container['title'] = $data['title'] ?? null; + $this->container['populate_auto_fill_fields'] = $data['populate_auto_fill_fields'] ?? false; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): SignatureRequestEditEmbeddedWithTemplateRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): SignatureRequestEditEmbeddedWithTemplateRequest + { + /** @var SignatureRequestEditEmbeddedWithTemplateRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + SignatureRequestEditEmbeddedWithTemplateRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['template_ids'] === null) { + $invalidProperties[] = "'template_ids' can't be null"; + } + if ($this->container['client_id'] === null) { + $invalidProperties[] = "'client_id' can't be null"; + } + if ($this->container['signers'] === null) { + $invalidProperties[] = "'signers' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets template_ids + * + * @return string[] + */ + public function getTemplateIds() + { + return $this->container['template_ids']; + } + + /** + * Sets template_ids + * + * @param string[] $template_ids use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used + * + * @return self + */ + public function setTemplateIds(array $template_ids) + { + $this->container['template_ids'] = $template_ids; + + return $this; + } + + /** + * Gets client_id + * + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string $client_id Client id of the app you're using to create this embedded signature request. Used for security purposes. + * + * @return self + */ + public function setClientId(string $client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestTemplateSigner[] + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestTemplateSigner[] $signers add Signers to your Templated-based Signature Request + * + * @return self + */ + public function setSigners(array $signers) + { + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets ccs + * + * @return SubCC[]|null + */ + public function getCcs() + { + return $this->container['ccs']; + } + + /** + * Sets ccs + * + * @param SubCC[]|null $ccs Add CC email recipients. Required when a CC role exists for the Template. + * + * @return self + */ + public function setCcs(?array $ccs) + { + $this->container['ccs'] = $ccs; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields An array defining values and options for custom fields. Required when a custom field exists in the Template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (!is_null($message) && (mb_strlen($message) > 5000)) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (!is_null($subject) && (mb_strlen($subject) > 255)) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (!is_null($title) && (mb_strlen($title) > 255)) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditEmbeddedWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets populate_auto_fill_fields + * + * @return bool|null + */ + public function getPopulateAutoFillFields() + { + return $this->container['populate_auto_fill_fields']; + } + + /** + * Sets populate_auto_fill_fields + * + * @param bool|null $populate_auto_fill_fields Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. ⚠️ **Note** ⚠️: Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + * + * @return self + */ + public function setPopulateAutoFillFields(?bool $populate_auto_fill_fields) + { + $this->container['populate_auto_fill_fields'] = $populate_auto_fill_fields; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return scalar|object|array|null returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestEditRequest.php b/src/Model/SignatureRequestEditRequest.php new file mode 100644 index 0000000..cbc0ac3 --- /dev/null +++ b/src/Model/SignatureRequestEditRequest.php @@ -0,0 +1,1119 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class SignatureRequestEditRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestSigner[]', + 'grouped_signers' => '\Dropbox\Sign\Model\SubSignatureRequestGroupedSigners[]', + 'allow_decline' => 'bool', + 'allow_reassign' => 'bool', + 'attachments' => '\Dropbox\Sign\Model\SubAttachment[]', + 'cc_email_addresses' => 'string[]', + 'client_id' => 'string', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'field_options' => '\Dropbox\Sign\Model\SubFieldOptions', + 'form_field_groups' => '\Dropbox\Sign\Model\SubFormFieldGroup[]', + 'form_field_rules' => '\Dropbox\Sign\Model\SubFormFieldRule[]', + 'form_fields_per_document' => '\Dropbox\Sign\Model\SubFormFieldsPerDocumentBase[]', + 'hide_text_tags' => 'bool', + 'is_qualified_signature' => 'bool', + 'is_eid' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'signing_redirect_url' => 'string', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + 'use_text_tags' => 'bool', + 'expires_at' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'files' => 'binary', + 'file_urls' => null, + 'signers' => null, + 'grouped_signers' => null, + 'allow_decline' => null, + 'allow_reassign' => null, + 'attachments' => null, + 'cc_email_addresses' => 'email', + 'client_id' => null, + 'custom_fields' => null, + 'field_options' => null, + 'form_field_groups' => null, + 'form_field_rules' => null, + 'form_fields_per_document' => null, + 'hide_text_tags' => null, + 'is_qualified_signature' => null, + 'is_eid' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'signing_redirect_url' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + 'use_text_tags' => null, + 'expires_at' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'files' => 'files', + 'file_urls' => 'file_urls', + 'signers' => 'signers', + 'grouped_signers' => 'grouped_signers', + 'allow_decline' => 'allow_decline', + 'allow_reassign' => 'allow_reassign', + 'attachments' => 'attachments', + 'cc_email_addresses' => 'cc_email_addresses', + 'client_id' => 'client_id', + 'custom_fields' => 'custom_fields', + 'field_options' => 'field_options', + 'form_field_groups' => 'form_field_groups', + 'form_field_rules' => 'form_field_rules', + 'form_fields_per_document' => 'form_fields_per_document', + 'hide_text_tags' => 'hide_text_tags', + 'is_qualified_signature' => 'is_qualified_signature', + 'is_eid' => 'is_eid', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'signing_redirect_url' => 'signing_redirect_url', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + 'use_text_tags' => 'use_text_tags', + 'expires_at' => 'expires_at', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'signers' => 'setSigners', + 'grouped_signers' => 'setGroupedSigners', + 'allow_decline' => 'setAllowDecline', + 'allow_reassign' => 'setAllowReassign', + 'attachments' => 'setAttachments', + 'cc_email_addresses' => 'setCcEmailAddresses', + 'client_id' => 'setClientId', + 'custom_fields' => 'setCustomFields', + 'field_options' => 'setFieldOptions', + 'form_field_groups' => 'setFormFieldGroups', + 'form_field_rules' => 'setFormFieldRules', + 'form_fields_per_document' => 'setFormFieldsPerDocument', + 'hide_text_tags' => 'setHideTextTags', + 'is_qualified_signature' => 'setIsQualifiedSignature', + 'is_eid' => 'setIsEid', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'signing_redirect_url' => 'setSigningRedirectUrl', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + 'use_text_tags' => 'setUseTextTags', + 'expires_at' => 'setExpiresAt', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'signers' => 'getSigners', + 'grouped_signers' => 'getGroupedSigners', + 'allow_decline' => 'getAllowDecline', + 'allow_reassign' => 'getAllowReassign', + 'attachments' => 'getAttachments', + 'cc_email_addresses' => 'getCcEmailAddresses', + 'client_id' => 'getClientId', + 'custom_fields' => 'getCustomFields', + 'field_options' => 'getFieldOptions', + 'form_field_groups' => 'getFormFieldGroups', + 'form_field_rules' => 'getFormFieldRules', + 'form_fields_per_document' => 'getFormFieldsPerDocument', + 'hide_text_tags' => 'getHideTextTags', + 'is_qualified_signature' => 'getIsQualifiedSignature', + 'is_eid' => 'getIsEid', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'signing_redirect_url' => 'getSigningRedirectUrl', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + 'use_text_tags' => 'getUseTextTags', + 'expires_at' => 'getExpiresAt', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['files'] = $data['files'] ?? null; + $this->container['file_urls'] = $data['file_urls'] ?? null; + $this->container['signers'] = $data['signers'] ?? null; + $this->container['grouped_signers'] = $data['grouped_signers'] ?? null; + $this->container['allow_decline'] = $data['allow_decline'] ?? false; + $this->container['allow_reassign'] = $data['allow_reassign'] ?? false; + $this->container['attachments'] = $data['attachments'] ?? null; + $this->container['cc_email_addresses'] = $data['cc_email_addresses'] ?? null; + $this->container['client_id'] = $data['client_id'] ?? null; + $this->container['custom_fields'] = $data['custom_fields'] ?? null; + $this->container['field_options'] = $data['field_options'] ?? null; + $this->container['form_field_groups'] = $data['form_field_groups'] ?? null; + $this->container['form_field_rules'] = $data['form_field_rules'] ?? null; + $this->container['form_fields_per_document'] = $data['form_fields_per_document'] ?? null; + $this->container['hide_text_tags'] = $data['hide_text_tags'] ?? false; + $this->container['is_qualified_signature'] = $data['is_qualified_signature'] ?? false; + $this->container['is_eid'] = $data['is_eid'] ?? false; + $this->container['message'] = $data['message'] ?? null; + $this->container['metadata'] = $data['metadata'] ?? null; + $this->container['signing_options'] = $data['signing_options'] ?? null; + $this->container['signing_redirect_url'] = $data['signing_redirect_url'] ?? null; + $this->container['subject'] = $data['subject'] ?? null; + $this->container['test_mode'] = $data['test_mode'] ?? false; + $this->container['title'] = $data['title'] ?? null; + $this->container['use_text_tags'] = $data['use_text_tags'] ?? false; + $this->container['expires_at'] = $data['expires_at'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): SignatureRequestEditRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): SignatureRequestEditRequest + { + /** @var SignatureRequestEditRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + SignatureRequestEditRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestSigner[]|null + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestSigner[]|null $signers Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setSigners(?array $signers) + { + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets grouped_signers + * + * @return SubSignatureRequestGroupedSigners[]|null + */ + public function getGroupedSigners() + { + return $this->container['grouped_signers']; + } + + /** + * Sets grouped_signers + * + * @param SubSignatureRequestGroupedSigners[]|null $grouped_signers Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both. + * + * @return self + */ + public function setGroupedSigners(?array $grouped_signers) + { + $this->container['grouped_signers'] = $grouped_signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets allow_reassign + * + * @return bool|null + */ + public function getAllowReassign() + { + return $this->container['allow_reassign']; + } + + /** + * Sets allow_reassign + * + * @param bool|null $allow_reassign Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **Note**: Only available for Premium plan and higher. + * + * @return self + */ + public function setAllowReassign(?bool $allow_reassign) + { + $this->container['allow_reassign'] = $allow_reassign; + + return $this; + } + + /** + * Gets attachments + * + * @return SubAttachment[]|null + */ + public function getAttachments() + { + return $this->container['attachments']; + } + + /** + * Sets attachments + * + * @param SubAttachment[]|null $attachments A list describing the attachments + * + * @return self + */ + public function setAttachments(?array $attachments) + { + $this->container['attachments'] = $attachments; + + return $this; + } + + /** + * Gets cc_email_addresses + * + * @return string[]|null + */ + public function getCcEmailAddresses() + { + return $this->container['cc_email_addresses']; + } + + /** + * Sets cc_email_addresses + * + * @param string[]|null $cc_email_addresses the email addresses that should be CCed + * + * @return self + */ + public function setCcEmailAddresses(?array $cc_email_addresses) + { + $this->container['cc_email_addresses'] = $cc_email_addresses; + + return $this; + } + + /** + * Gets client_id + * + * @return string|null + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string|null $client_id The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. + * + * @return self + */ + public function setClientId(?string $client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets field_options + * + * @return SubFieldOptions|null + */ + public function getFieldOptions() + { + return $this->container['field_options']; + } + + /** + * Sets field_options + * + * @param SubFieldOptions|null $field_options field_options + * + * @return self + */ + public function setFieldOptions(?SubFieldOptions $field_options) + { + $this->container['field_options'] = $field_options; + + return $this; + } + + /** + * Gets form_field_groups + * + * @return SubFormFieldGroup[]|null + */ + public function getFormFieldGroups() + { + return $this->container['form_field_groups']; + } + + /** + * Sets form_field_groups + * + * @param SubFormFieldGroup[]|null $form_field_groups Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. + * + * @return self + */ + public function setFormFieldGroups(?array $form_field_groups) + { + $this->container['form_field_groups'] = $form_field_groups; + + return $this; + } + + /** + * Gets form_field_rules + * + * @return SubFormFieldRule[]|null + */ + public function getFormFieldRules() + { + return $this->container['form_field_rules']; + } + + /** + * Sets form_field_rules + * + * @param SubFormFieldRule[]|null $form_field_rules conditional Logic rules for fields defined in `form_fields_per_document` + * + * @return self + */ + public function setFormFieldRules(?array $form_field_rules) + { + $this->container['form_field_rules'] = $form_field_rules; + + return $this; + } + + /** + * Gets form_fields_per_document + * + * @return SubFormFieldsPerDocumentBase[]|null + */ + public function getFormFieldsPerDocument() + { + return $this->container['form_fields_per_document']; + } + + /** + * Sets form_fields_per_document + * + * @param SubFormFieldsPerDocumentBase[]|null $form_fields_per_document The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE**: Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + * + * @return self + */ + public function setFormFieldsPerDocument(?array $form_fields_per_document) + { + $this->container['form_fields_per_document'] = $form_fields_per_document; + + return $this; + } + + /** + * Gets hide_text_tags + * + * @return bool|null + */ + public function getHideTextTags() + { + return $this->container['hide_text_tags']; + } + + /** + * Sets hide_text_tags + * + * @param bool|null $hide_text_tags Enables automatic Text Tag removal when set to true. **NOTE**: Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + * + * @return self + */ + public function setHideTextTags(?bool $hide_text_tags) + { + $this->container['hide_text_tags'] = $hide_text_tags; + + return $this; + } + + /** + * Gets is_qualified_signature + * + * @return bool|null + * @deprecated + */ + public function getIsQualifiedSignature() + { + return $this->container['is_qualified_signature']; + } + + /** + * Sets is_qualified_signature + * + * @param bool|null $is_qualified_signature Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.
**Note**: QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @return self + * @deprecated + */ + public function setIsQualifiedSignature(?bool $is_qualified_signature) + { + $this->container['is_qualified_signature'] = $is_qualified_signature; + + return $this; + } + + /** + * Gets is_eid + * + * @return bool|null + */ + public function getIsEid() + { + return $this->container['is_eid']; + } + + /** + * Sets is_eid + * + * @param bool|null $is_eid Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @return self + */ + public function setIsEid(?bool $is_eid) + { + $this->container['is_eid'] = $is_eid; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (!is_null($message) && (mb_strlen($message) > 5000)) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets signing_redirect_url + * + * @return string|null + */ + public function getSigningRedirectUrl() + { + return $this->container['signing_redirect_url']; + } + + /** + * Sets signing_redirect_url + * + * @param string|null $signing_redirect_url the URL you want signers redirected to after they successfully sign + * + * @return self + */ + public function setSigningRedirectUrl(?string $signing_redirect_url) + { + $this->container['signing_redirect_url'] = $signing_redirect_url; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (!is_null($subject) && (mb_strlen($subject) > 255)) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (!is_null($title) && (mb_strlen($title) > 255)) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets use_text_tags + * + * @return bool|null + */ + public function getUseTextTags() + { + return $this->container['use_text_tags']; + } + + /** + * Sets use_text_tags + * + * @param bool|null $use_text_tags Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + * + * @return self + */ + public function setUseTextTags(?bool $use_text_tags) + { + $this->container['use_text_tags'] = $use_text_tags; + + return $this; + } + + /** + * Gets expires_at + * + * @return int|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param int|null $expires_at When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. + * + * @return self + */ + public function setExpiresAt(?int $expires_at) + { + $this->container['expires_at'] = $expires_at; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return scalar|object|array|null returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestEditWithTemplateRequest.php b/src/Model/SignatureRequestEditWithTemplateRequest.php new file mode 100644 index 0000000..420b59e --- /dev/null +++ b/src/Model/SignatureRequestEditWithTemplateRequest.php @@ -0,0 +1,855 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class SignatureRequestEditWithTemplateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SignatureRequestEditWithTemplateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'template_ids' => 'string[]', + 'signers' => '\Dropbox\Sign\Model\SubSignatureRequestTemplateSigner[]', + 'allow_decline' => 'bool', + 'ccs' => '\Dropbox\Sign\Model\SubCC[]', + 'client_id' => 'string', + 'custom_fields' => '\Dropbox\Sign\Model\SubCustomField[]', + 'files' => '\SplFileObject[]', + 'file_urls' => 'string[]', + 'is_qualified_signature' => 'bool', + 'is_eid' => 'bool', + 'message' => 'string', + 'metadata' => 'array', + 'signing_options' => '\Dropbox\Sign\Model\SubSigningOptions', + 'signing_redirect_url' => 'string', + 'subject' => 'string', + 'test_mode' => 'bool', + 'title' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'template_ids' => null, + 'signers' => null, + 'allow_decline' => null, + 'ccs' => null, + 'client_id' => null, + 'custom_fields' => null, + 'files' => 'binary', + 'file_urls' => null, + 'is_qualified_signature' => null, + 'is_eid' => null, + 'message' => null, + 'metadata' => null, + 'signing_options' => null, + 'signing_redirect_url' => null, + 'subject' => null, + 'test_mode' => null, + 'title' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template_ids' => 'template_ids', + 'signers' => 'signers', + 'allow_decline' => 'allow_decline', + 'ccs' => 'ccs', + 'client_id' => 'client_id', + 'custom_fields' => 'custom_fields', + 'files' => 'files', + 'file_urls' => 'file_urls', + 'is_qualified_signature' => 'is_qualified_signature', + 'is_eid' => 'is_eid', + 'message' => 'message', + 'metadata' => 'metadata', + 'signing_options' => 'signing_options', + 'signing_redirect_url' => 'signing_redirect_url', + 'subject' => 'subject', + 'test_mode' => 'test_mode', + 'title' => 'title', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template_ids' => 'setTemplateIds', + 'signers' => 'setSigners', + 'allow_decline' => 'setAllowDecline', + 'ccs' => 'setCcs', + 'client_id' => 'setClientId', + 'custom_fields' => 'setCustomFields', + 'files' => 'setFiles', + 'file_urls' => 'setFileUrls', + 'is_qualified_signature' => 'setIsQualifiedSignature', + 'is_eid' => 'setIsEid', + 'message' => 'setMessage', + 'metadata' => 'setMetadata', + 'signing_options' => 'setSigningOptions', + 'signing_redirect_url' => 'setSigningRedirectUrl', + 'subject' => 'setSubject', + 'test_mode' => 'setTestMode', + 'title' => 'setTitle', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template_ids' => 'getTemplateIds', + 'signers' => 'getSigners', + 'allow_decline' => 'getAllowDecline', + 'ccs' => 'getCcs', + 'client_id' => 'getClientId', + 'custom_fields' => 'getCustomFields', + 'files' => 'getFiles', + 'file_urls' => 'getFileUrls', + 'is_qualified_signature' => 'getIsQualifiedSignature', + 'is_eid' => 'getIsEid', + 'message' => 'getMessage', + 'metadata' => 'getMetadata', + 'signing_options' => 'getSigningOptions', + 'signing_redirect_url' => 'getSigningRedirectUrl', + 'subject' => 'getSubject', + 'test_mode' => 'getTestMode', + 'title' => 'getTitle', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var array + */ + protected $container = []; + + /** + * Constructor + * + * @param array|null $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['template_ids'] = $data['template_ids'] ?? null; + $this->container['signers'] = $data['signers'] ?? null; + $this->container['allow_decline'] = $data['allow_decline'] ?? false; + $this->container['ccs'] = $data['ccs'] ?? null; + $this->container['client_id'] = $data['client_id'] ?? null; + $this->container['custom_fields'] = $data['custom_fields'] ?? null; + $this->container['files'] = $data['files'] ?? null; + $this->container['file_urls'] = $data['file_urls'] ?? null; + $this->container['is_qualified_signature'] = $data['is_qualified_signature'] ?? false; + $this->container['is_eid'] = $data['is_eid'] ?? false; + $this->container['message'] = $data['message'] ?? null; + $this->container['metadata'] = $data['metadata'] ?? null; + $this->container['signing_options'] = $data['signing_options'] ?? null; + $this->container['signing_redirect_url'] = $data['signing_redirect_url'] ?? null; + $this->container['subject'] = $data['subject'] ?? null; + $this->container['test_mode'] = $data['test_mode'] ?? false; + $this->container['title'] = $data['title'] ?? null; + } + + /** @deprecated use ::init() */ + public static function fromArray(array $data): SignatureRequestEditWithTemplateRequest + { + return self::init($data); + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + public static function init(array $data): SignatureRequestEditWithTemplateRequest + { + /** @var SignatureRequestEditWithTemplateRequest $obj */ + $obj = ObjectSerializer::deserialize( + $data, + SignatureRequestEditWithTemplateRequest::class, + ); + + return $obj; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['template_ids'] === null) { + $invalidProperties[] = "'template_ids' can't be null"; + } + if ($this->container['signers'] === null) { + $invalidProperties[] = "'signers' can't be null"; + } + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 5000)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 5000."; + } + + if (!is_null($this->container['subject']) && (mb_strlen($this->container['subject']) > 255)) { + $invalidProperties[] = "invalid value for 'subject', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets template_ids + * + * @return string[] + */ + public function getTemplateIds() + { + return $this->container['template_ids']; + } + + /** + * Sets template_ids + * + * @param string[] $template_ids use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used + * + * @return self + */ + public function setTemplateIds(array $template_ids) + { + $this->container['template_ids'] = $template_ids; + + return $this; + } + + /** + * Gets signers + * + * @return SubSignatureRequestTemplateSigner[] + */ + public function getSigners() + { + return $this->container['signers']; + } + + /** + * Sets signers + * + * @param SubSignatureRequestTemplateSigner[] $signers add Signers to your Templated-based Signature Request + * + * @return self + */ + public function setSigners(array $signers) + { + $this->container['signers'] = $signers; + + return $this; + } + + /** + * Gets allow_decline + * + * @return bool|null + */ + public function getAllowDecline() + { + return $this->container['allow_decline']; + } + + /** + * Sets allow_decline + * + * @param bool|null $allow_decline Allows signers to decline to sign a document if `true`. Defaults to `false`. + * + * @return self + */ + public function setAllowDecline(?bool $allow_decline) + { + $this->container['allow_decline'] = $allow_decline; + + return $this; + } + + /** + * Gets ccs + * + * @return SubCC[]|null + */ + public function getCcs() + { + return $this->container['ccs']; + } + + /** + * Sets ccs + * + * @param SubCC[]|null $ccs Add CC email recipients. Required when a CC role exists for the Template. + * + * @return self + */ + public function setCcs(?array $ccs) + { + $this->container['ccs'] = $ccs; + + return $this; + } + + /** + * Gets client_id + * + * @return string|null + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string|null $client_id Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. + * + * @return self + */ + public function setClientId(?string $client_id) + { + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets custom_fields + * + * @return SubCustomField[]|null + */ + public function getCustomFields() + { + return $this->container['custom_fields']; + } + + /** + * Sets custom_fields + * + * @param SubCustomField[]|null $custom_fields An array defining values and options for custom fields. Required when a custom field exists in the Template. + * + * @return self + */ + public function setCustomFields(?array $custom_fields) + { + $this->container['custom_fields'] = $custom_fields; + + return $this; + } + + /** + * Gets files + * + * @return SplFileObject[]|null + */ + public function getFiles() + { + return $this->container['files']; + } + + /** + * Sets files + * + * @param SplFileObject[]|null $files Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFiles(?array $files) + { + $this->container['files'] = $files; + + return $this; + } + + /** + * Gets file_urls + * + * @return string[]|null + */ + public function getFileUrls() + { + return $this->container['file_urls']; + } + + /** + * Sets file_urls + * + * @param string[]|null $file_urls Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both. + * + * @return self + */ + public function setFileUrls(?array $file_urls) + { + $this->container['file_urls'] = $file_urls; + + return $this; + } + + /** + * Gets is_qualified_signature + * + * @return bool|null + * @deprecated + */ + public function getIsQualifiedSignature() + { + return $this->container['is_qualified_signature']; + } + + /** + * Sets is_qualified_signature + * + * @param bool|null $is_qualified_signature Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.
**Note**: QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @return self + * @deprecated + */ + public function setIsQualifiedSignature(?bool $is_qualified_signature) + { + $this->container['is_qualified_signature'] = $is_qualified_signature; + + return $this; + } + + /** + * Gets is_eid + * + * @return bool|null + */ + public function getIsEid() + { + return $this->container['is_eid']; + } + + /** + * Sets is_eid + * + * @param bool|null $is_eid Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**Note**: eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @return self + */ + public function setIsEid(?bool $is_eid) + { + $this->container['is_eid'] = $is_eid; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message the custom message in the email that will be sent to the signers + * + * @return self + */ + public function setMessage(?string $message) + { + if (!is_null($message) && (mb_strlen($message) > 5000)) { + throw new InvalidArgumentException('invalid length for $message when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 5000.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. + * + * @return self + */ + public function setMetadata(?array $metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets signing_options + * + * @return SubSigningOptions|null + */ + public function getSigningOptions() + { + return $this->container['signing_options']; + } + + /** + * Sets signing_options + * + * @param SubSigningOptions|null $signing_options signing_options + * + * @return self + */ + public function setSigningOptions(?SubSigningOptions $signing_options) + { + $this->container['signing_options'] = $signing_options; + + return $this; + } + + /** + * Gets signing_redirect_url + * + * @return string|null + */ + public function getSigningRedirectUrl() + { + return $this->container['signing_redirect_url']; + } + + /** + * Sets signing_redirect_url + * + * @param string|null $signing_redirect_url the URL you want signers redirected to after they successfully sign + * + * @return self + */ + public function setSigningRedirectUrl(?string $signing_redirect_url) + { + $this->container['signing_redirect_url'] = $signing_redirect_url; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject the subject in the email that will be sent to the signers + * + * @return self + */ + public function setSubject(?string $subject) + { + if (!is_null($subject) && (mb_strlen($subject) > 255)) { + throw new InvalidArgumentException('invalid length for $subject when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets test_mode + * + * @return bool|null + */ + public function getTestMode() + { + return $this->container['test_mode']; + } + + /** + * Sets test_mode + * + * @param bool|null $test_mode Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + * + * @return self + */ + public function setTestMode(?bool $test_mode) + { + $this->container['test_mode'] = $test_mode; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title the title you want to assign to the SignatureRequest + * + * @return self + */ + public function setTitle(?string $title) + { + if (!is_null($title) && (mb_strlen($title) > 255)) { + throw new InvalidArgumentException('invalid length for $title when calling SignatureRequestEditWithTemplateRequest., must be smaller than or equal to 255.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param mixed $offset Offset + * + * @return bool + */ + #[ReturnTypeWillChange] + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param mixed $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param mixed $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param mixed $offset Offset + * + * @return void + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return scalar|object|array|null returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/SignatureRequestResponse.php b/src/Model/SignatureRequestResponse.php index 00dc396..9a49a3c 100644 --- a/src/Model/SignatureRequestResponse.php +++ b/src/Model/SignatureRequestResponse.php @@ -80,11 +80,13 @@ class SignatureRequestResponse implements ModelInterface, ArrayAccess, JsonSeria 'details_url' => 'string', 'cc_email_addresses' => 'string[]', 'signing_redirect_url' => 'string', + 'final_copy_uri' => 'string', 'template_ids' => 'string[]', 'custom_fields' => '\Dropbox\Sign\Model\SignatureRequestResponseCustomFieldBase[]', 'attachments' => '\Dropbox\Sign\Model\SignatureRequestResponseAttachment[]', 'response_data' => '\Dropbox\Sign\Model\SignatureRequestResponseDataBase[]', 'signatures' => '\Dropbox\Sign\Model\SignatureRequestResponseSignatures[]', + 'bulk_send_job_id' => 'string', ]; /** @@ -113,11 +115,13 @@ class SignatureRequestResponse implements ModelInterface, ArrayAccess, JsonSeria 'details_url' => null, 'cc_email_addresses' => null, 'signing_redirect_url' => null, + 'final_copy_uri' => null, 'template_ids' => null, 'custom_fields' => null, 'attachments' => null, 'response_data' => null, 'signatures' => null, + 'bulk_send_job_id' => null, ]; /** @@ -165,11 +169,13 @@ public static function openAPIFormats() 'details_url' => 'details_url', 'cc_email_addresses' => 'cc_email_addresses', 'signing_redirect_url' => 'signing_redirect_url', + 'final_copy_uri' => 'final_copy_uri', 'template_ids' => 'template_ids', 'custom_fields' => 'custom_fields', 'attachments' => 'attachments', 'response_data' => 'response_data', 'signatures' => 'signatures', + 'bulk_send_job_id' => 'bulk_send_job_id', ]; /** @@ -196,11 +202,13 @@ public static function openAPIFormats() 'details_url' => 'setDetailsUrl', 'cc_email_addresses' => 'setCcEmailAddresses', 'signing_redirect_url' => 'setSigningRedirectUrl', + 'final_copy_uri' => 'setFinalCopyUri', 'template_ids' => 'setTemplateIds', 'custom_fields' => 'setCustomFields', 'attachments' => 'setAttachments', 'response_data' => 'setResponseData', 'signatures' => 'setSignatures', + 'bulk_send_job_id' => 'setBulkSendJobId', ]; /** @@ -227,11 +235,13 @@ public static function openAPIFormats() 'details_url' => 'getDetailsUrl', 'cc_email_addresses' => 'getCcEmailAddresses', 'signing_redirect_url' => 'getSigningRedirectUrl', + 'final_copy_uri' => 'getFinalCopyUri', 'template_ids' => 'getTemplateIds', 'custom_fields' => 'getCustomFields', 'attachments' => 'getAttachments', 'response_data' => 'getResponseData', 'signatures' => 'getSignatures', + 'bulk_send_job_id' => 'getBulkSendJobId', ]; /** @@ -308,11 +318,13 @@ public function __construct(array $data = null) $this->container['details_url'] = $data['details_url'] ?? null; $this->container['cc_email_addresses'] = $data['cc_email_addresses'] ?? null; $this->container['signing_redirect_url'] = $data['signing_redirect_url'] ?? null; + $this->container['final_copy_uri'] = $data['final_copy_uri'] ?? null; $this->container['template_ids'] = $data['template_ids'] ?? null; $this->container['custom_fields'] = $data['custom_fields'] ?? null; $this->container['attachments'] = $data['attachments'] ?? null; $this->container['response_data'] = $data['response_data'] ?? null; $this->container['signatures'] = $data['signatures'] ?? null; + $this->container['bulk_send_job_id'] = $data['bulk_send_job_id'] ?? null; } /** @deprecated use ::init() */ @@ -788,6 +800,30 @@ public function setSigningRedirectUrl(?string $signing_redirect_url) return $this; } + /** + * Gets final_copy_uri + * + * @return string|null + */ + public function getFinalCopyUri() + { + return $this->container['final_copy_uri']; + } + + /** + * Sets final_copy_uri + * + * @param string|null $final_copy_uri The path where the completed document can be downloaded + * + * @return self + */ + public function setFinalCopyUri(?string $final_copy_uri) + { + $this->container['final_copy_uri'] = $final_copy_uri; + + return $this; + } + /** * Gets template_ids * @@ -908,6 +944,30 @@ public function setSignatures(?array $signatures) return $this; } + /** + * Gets bulk_send_job_id + * + * @return string|null + */ + public function getBulkSendJobId() + { + return $this->container['bulk_send_job_id']; + } + + /** + * Sets bulk_send_job_id + * + * @param string|null $bulk_send_job_id the ID of the Bulk Send job which sent the signature request, if applicable + * + * @return self + */ + public function setBulkSendJobId(?string $bulk_send_job_id) + { + $this->container['bulk_send_job_id'] = $bulk_send_job_id; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/SubFormFieldsPerDocumentDateSigned.php b/src/Model/SubFormFieldsPerDocumentDateSigned.php index bbad5f6..001fa84 100644 --- a/src/Model/SubFormFieldsPerDocumentDateSigned.php +++ b/src/Model/SubFormFieldsPerDocumentDateSigned.php @@ -229,7 +229,7 @@ public function __construct(array $data = null) $this->container['type'] = $data['type'] ?? 'date_signed'; $this->container['font_family'] = $data['font_family'] ?? null; - $this->container['font_size'] = $data['font_size'] ?? null; + $this->container['font_size'] = $data['font_size'] ?? 12; } /** @deprecated use ::init() */ diff --git a/src/Model/SubFormFieldsPerDocumentDropdown.php b/src/Model/SubFormFieldsPerDocumentDropdown.php index de13f34..0ccbf56 100644 --- a/src/Model/SubFormFieldsPerDocumentDropdown.php +++ b/src/Model/SubFormFieldsPerDocumentDropdown.php @@ -241,7 +241,7 @@ public function __construct(array $data = null) $this->container['options'] = $data['options'] ?? null; $this->container['content'] = $data['content'] ?? null; $this->container['font_family'] = $data['font_family'] ?? null; - $this->container['font_size'] = $data['font_size'] ?? null; + $this->container['font_size'] = $data['font_size'] ?? 12; } /** @deprecated use ::init() */ diff --git a/src/Model/SubFormFieldsPerDocumentHyperlink.php b/src/Model/SubFormFieldsPerDocumentHyperlink.php index 1223fbf..5c09366 100644 --- a/src/Model/SubFormFieldsPerDocumentHyperlink.php +++ b/src/Model/SubFormFieldsPerDocumentHyperlink.php @@ -241,7 +241,7 @@ public function __construct(array $data = null) $this->container['content'] = $data['content'] ?? null; $this->container['content_url'] = $data['content_url'] ?? null; $this->container['font_family'] = $data['font_family'] ?? null; - $this->container['font_size'] = $data['font_size'] ?? null; + $this->container['font_size'] = $data['font_size'] ?? 12; } /** @deprecated use ::init() */ diff --git a/src/Model/SubFormFieldsPerDocumentText.php b/src/Model/SubFormFieldsPerDocumentText.php index dac3e03..844d3f6 100644 --- a/src/Model/SubFormFieldsPerDocumentText.php +++ b/src/Model/SubFormFieldsPerDocumentText.php @@ -308,7 +308,7 @@ public function __construct(array $data = null) $this->container['validation_custom_regex_format_label'] = $data['validation_custom_regex_format_label'] ?? null; $this->container['content'] = $data['content'] ?? null; $this->container['font_family'] = $data['font_family'] ?? null; - $this->container['font_size'] = $data['font_size'] ?? null; + $this->container['font_size'] = $data['font_size'] ?? 12; } /** @deprecated use ::init() */ diff --git a/src/Model/SubFormFieldsPerDocumentTextMerge.php b/src/Model/SubFormFieldsPerDocumentTextMerge.php index fe9bcce..60f367f 100644 --- a/src/Model/SubFormFieldsPerDocumentTextMerge.php +++ b/src/Model/SubFormFieldsPerDocumentTextMerge.php @@ -229,7 +229,7 @@ public function __construct(array $data = null) $this->container['type'] = $data['type'] ?? 'text-merge'; $this->container['font_family'] = $data['font_family'] ?? null; - $this->container['font_size'] = $data['font_size'] ?? null; + $this->container['font_size'] = $data['font_size'] ?? 12; } /** @deprecated use ::init() */ diff --git a/src/Model/SubSignatureRequestSigner.php b/src/Model/SubSignatureRequestSigner.php index 2a84119..401935f 100644 --- a/src/Model/SubSignatureRequestSigner.php +++ b/src/Model/SubSignatureRequestSigner.php @@ -408,7 +408,7 @@ public function getSmsPhoneNumber() /** * Sets sms_phone_number * - * @param string|null $sms_phone_number An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher. + * @param string|null $sms_phone_number An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. * * @return self */ diff --git a/src/Model/SubSignatureRequestTemplateSigner.php b/src/Model/SubSignatureRequestTemplateSigner.php index 8258911..bb5618d 100644 --- a/src/Model/SubSignatureRequestTemplateSigner.php +++ b/src/Model/SubSignatureRequestTemplateSigner.php @@ -411,7 +411,7 @@ public function getSmsPhoneNumber() /** * Sets sms_phone_number * - * @param string|null $sms_phone_number An E.164 formatted phone number. **Note**: Not available in test mode and requires a Standard plan or higher. + * @param string|null $sms_phone_number An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **Note**: Not available in test mode and requires a Standard plan or higher. * * @return self */ diff --git a/templates/EventCallbackHelper.mustache b/templates/EventCallbackHelper.mustache index 8f49a26..7d887d3 100644 --- a/templates/EventCallbackHelper.mustache +++ b/templates/EventCallbackHelper.mustache @@ -65,8 +65,10 @@ abstract class EventCallbackHelper ): string { $meta_data = $event_callback->getEvent()->getEventMetadata(); - return !empty($meta_data->getReportedForAppId()) - ? self::EVENT_TYPE_APP_CALLBACK - : self::EVENT_TYPE_ACCOUNT_CALLBACK; + if (empty($meta_data) || empty($meta_data->getReportedForAppId())) { + return self::EVENT_TYPE_ACCOUNT_CALLBACK; + } + + return self::EVENT_TYPE_APP_CALLBACK; } } diff --git a/test/EventCallbackHelperTest.php b/test/EventCallbackHelperTest.php index 0c9560b..0580f0d 100644 --- a/test/EventCallbackHelperTest.php +++ b/test/EventCallbackHelperTest.php @@ -17,33 +17,55 @@ class EventCallbackHelperTest extends SignTestCase public function testIsValid( string $apiKey, array $data, - bool $passes + bool $passes, + string $callback_type ) { $callback_event = EventCallbackRequest::init($data); - $isValid = EventCallbackHelper::isValid($apiKey, $callback_event); + $this->assertEquals( + $passes, + EventCallbackHelper::isValid($apiKey, $callback_event) + ); - if ($passes) { - $this->assertTrue($isValid); - } else { - $this->assertFalse($isValid); - } + $this->assertEquals( + $callback_type, + EventCallbackHelper::getCallbackType($callback_event) + ); } public function providerIsValid(): iterable { - $fixtures = TestUtils::getFixtureData('EventCallbackHelper'); - foreach ($fixtures as $data) { + $account_fixtures = TestUtils::getFixtureData('EventCallbackHelper_AccountCallbacks'); + foreach ($account_fixtures as $data) { + yield [ + 'apiKey' => self::APIKEY, + 'data' => $data, + 'passes' => true, + 'callback_type' => EventCallbackHelper::EVENT_TYPE_ACCOUNT_CALLBACK, + ]; + + yield [ + 'apiKey' => strrev(self::APIKEY), + 'data' => $data, + 'passes' => false, + 'callback_type' => EventCallbackHelper::EVENT_TYPE_ACCOUNT_CALLBACK, + ]; + } + + $app_fixtures = TestUtils::getFixtureData('EventCallbackHelper_AppCallbacks'); + foreach ($app_fixtures as $data) { yield [ 'apiKey' => self::APIKEY, 'data' => $data, 'passes' => true, + 'callback_type' => EventCallbackHelper::EVENT_TYPE_APP_CALLBACK, ]; yield [ 'apiKey' => strrev(self::APIKEY), 'data' => $data, 'passes' => false, + 'callback_type' => EventCallbackHelper::EVENT_TYPE_APP_CALLBACK, ]; } } diff --git a/test_fixtures/EventCallbackHelper_AccountCallbacks.json b/test_fixtures/EventCallbackHelper_AccountCallbacks.json new file mode 100644 index 0000000..bbdf418 --- /dev/null +++ b/test_fixtures/EventCallbackHelper_AccountCallbacks.json @@ -0,0 +1,82 @@ +{ + "base": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "unknown_error", + "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "base_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "unknown_error", + "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371" + } + }, + "account": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "account_confirmed", + "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "account_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "account_confirmed", + "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848" + } + }, + "signature_request": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "signature_request_sent", + "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "signature_request_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "signature_request_sent", + "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756" + } + }, + "template": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "template_created", + "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d", + "event_metadata": { + "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + } + } + }, + "template_no_metadata": { + "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd", + "event": { + "event_time": "1348177752", + "event_type": "template_created", + "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d" + } + } +} diff --git a/test_fixtures/EventCallbackHelper.json b/test_fixtures/EventCallbackHelper_AppCallbacks.json similarity index 83% rename from test_fixtures/EventCallbackHelper.json rename to test_fixtures/EventCallbackHelper_AppCallbacks.json index bfd2346..bf6e9ad 100644 --- a/test_fixtures/EventCallbackHelper.json +++ b/test_fixtures/EventCallbackHelper_AppCallbacks.json @@ -7,7 +7,8 @@ "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } }, @@ -19,7 +20,8 @@ "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } }, @@ -31,7 +33,8 @@ "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } }, @@ -43,7 +46,8 @@ "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d", "event_metadata": { "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992", - "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd" + "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd", + "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0" } } } diff --git a/test_fixtures/SignatureRequestSendRequest.json b/test_fixtures/SignatureRequestSendRequest.json index b80dfb2..6a33979 100644 --- a/test_fixtures/SignatureRequestSendRequest.json +++ b/test_fixtures/SignatureRequestSendRequest.json @@ -122,7 +122,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -140,7 +141,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -153,7 +155,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -352,7 +355,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -370,7 +374,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, @@ -383,7 +388,8 @@ "height": 30, "required": true, "signer": "1", - "page": 1 + "page": 1, + "font_size": 12 }, { "document_index": 0, diff --git a/test_fixtures/SubFormFieldsPerDocument.json b/test_fixtures/SubFormFieldsPerDocument.json index 11ef509..afcbcc2 100644 --- a/test_fixtures/SubFormFieldsPerDocument.json +++ b/test_fixtures/SubFormFieldsPerDocument.json @@ -32,7 +32,8 @@ "height": 16, "x": 112, "y": 328, - "options": ["foo"] + "options": ["foo"], + "font_size": 12 }, "SubFormFieldsPerDocumentHyperlink": { "type" : "hyperlink", @@ -45,7 +46,8 @@ "x": 112, "y": 328, "content": "Dropbox Sign", - "content_url": "https://dropboxsign.com" + "content_url": "https://dropboxsign.com", + "font_size": 12 }, "SubFormFieldsPerDocumentInitials": { "type" : "initials", @@ -91,7 +93,8 @@ "width": 100, "height": 16, "x": 112, - "y": 328 + "y": 328, + "font_size": 12 }, "SubFormFieldsPerDocumentTextMerge": { "type" : "text-merge", @@ -102,6 +105,7 @@ "width": 100, "height": 16, "x": 112, - "y": 328 + "y": 328, + "font_size": 12 } }