docspring 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +6 -0
- data/AGENTS.md +2 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +10 -10
- data/LICENSE +1 -1
- data/README.md +4 -1
- data/docs/Client.md +98 -96
- data/docs/CreateSubmissionRequest.md +3 -3
- data/docs/CreateTemplateRequest.md +11 -3
- data/docs/ErrorInfo.md +7 -3
- data/docs/HtmlEngineOptions.md +4 -4
- data/docs/HtmlEngineOptionsInput.md +4 -4
- data/docs/SubmissionInput.md +1 -1
- data/docs/Template.md +10 -2
- data/docs/TemplateFormSection.md +24 -0
- data/docs/TemplateFormSectionInput.md +24 -0
- data/docs/UpdateTemplateRequest.md +10 -2
- data/docs/ValidateSubmissionRequest.md +3 -3
- data/lib/docspring/api/client.rb +99 -96
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/create_submission_request.rb +3 -3
- data/lib/docspring/models/create_template_request.rb +48 -6
- data/lib/docspring/models/error_info.rb +26 -6
- data/lib/docspring/models/html_engine_options.rb +4 -4
- data/lib/docspring/models/html_engine_options_input.rb +4 -4
- data/lib/docspring/models/submission_input.rb +1 -1
- data/lib/docspring/models/template.rb +85 -3
- data/lib/docspring/models/template_form_section.rb +254 -0
- data/lib/docspring/models/template_form_section_input.rb +252 -0
- data/lib/docspring/models/update_template_request.rb +47 -3
- data/lib/docspring/models/validate_submission_request.rb +3 -3
- data/lib/docspring/request_schemas.json +84 -10
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +2 -0
- data/spec/api/client_spec.rb +49 -48
- data/spec/models/create_template_request_spec.rb +24 -0
- data/spec/models/error_info_spec.rb +12 -0
- data/spec/models/template_form_section_input_spec.rb +54 -0
- data/spec/models/template_form_section_spec.rb +54 -0
- data/spec/models/template_spec.rb +24 -0
- data/spec/models/update_template_request_spec.rb +24 -0
- metadata +9 -1
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live. | [optional] |
|
|
8
8
|
| **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | [optional] |
|
|
9
|
-
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). | [optional] |
|
|
9
|
+
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). Signatures come only from signature requests: a value for a signature or initials field makes the submission `invalid_data`, in test mode too. To print an image or a name you send, use an Image or Text field. | [optional] |
|
|
10
10
|
| **metadata** | **Hash<String, Object>** | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`). | [optional] |
|
|
11
11
|
| **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. Word documents and OpenDocument files can't be password-protected, so a submission with a password can't make them. | [optional] |
|
|
12
12
|
| **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission. | [optional] |
|
|
13
13
|
| **expires_in** | **Integer** | Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. The demo API token's submissions expire within an hour: up to 3600, and that's their default. | [optional] |
|
|
14
|
-
| **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422.
|
|
14
|
+
| **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. A `default` for a signature or initials field makes the submission `invalid_data`. With `signature_requests`, `editable: true` is a 422. | [optional] |
|
|
15
15
|
| **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
|
|
16
16
|
| **css** | **String** | For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity. | [optional] |
|
|
17
|
-
| **signature_requests** | [**Array<SignatureRequestInput>**](SignatureRequestInput.md) | The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out.
|
|
17
|
+
| **signature_requests** | [**Array<SignatureRequestInput>**](SignatureRequestInput.md) | The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out. | [optional] |
|
|
18
18
|
| **send_email** | **Boolean** | Whether DocSpring emails the signers their signing links, and sends the reminders and the completed document. Default true. Each signature request's own `send_email` overrides it. A test submission only emails your DocSpring team: every other address is a 422. `true` needs `signature_requests`. DocSpring doesn't email the signers of a form library template: leave `send_email` out, and send them their links yourself. | [optional] |
|
|
19
19
|
| **signing_order** | [**SigningOrder**](SigningOrder.md) | `parallel` (the default): everyone can sign at once. `sequential`: people sign one step at a time (`signing_step`), and DocSpring emails each step when the one before it is done. Needs `signature_requests`. | [optional] |
|
|
20
20
|
| **email_subject** | **String** | The subject of the emails that ask people to sign. You can use `{{ signer.name }}`, `{{ signer.email }}`, `{{ document.name }}`, `{{ sender.name }}` and `{{ account.name }}`. Default "<sender> sent you <document> to sign" when you leave it out (a blank subject is a 422). Links and web addresses are shown as plain text (`example[.]com`). | [optional] |
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| **allow_skipping_optional_fields** | **Boolean** | Visual forms and signature request forms show the Continue button as soon as the required fields are filled in, without visiting each optional field. The `allowSkippingOptionalFields` embed option overrides it. | [optional] |
|
|
17
17
|
| **default_form_mode** | [**TemplateFormMode**](TemplateFormMode.md) | The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs). Only PDF templates have a visual form, so other templates accept only `web`. | [optional] |
|
|
18
18
|
| **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | [optional] |
|
|
19
|
-
| **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and
|
|
19
|
+
| **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Each one is stored in lowercase, without a trailing slash. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and Web Forms JS) aren't restricted. | [optional] |
|
|
20
20
|
| **embed_edit_allow_settings** | **Boolean** | Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on). | [optional] |
|
|
21
21
|
| **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | [optional] |
|
|
22
22
|
| **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | [optional] |
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
| **parse_dates_using_template_date_format** | **Boolean** | Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML or Word template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. | [optional] |
|
|
30
30
|
| **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | [optional] |
|
|
31
31
|
| **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | [optional] |
|
|
32
|
-
| **redirect_url** | **String** | Where the web form sends people after they submit it. | [optional] |
|
|
32
|
+
| **redirect_url** | **String** | Where the web form sends people after they submit it, instead of showing its success screen. After its `?` or `#`, it can have variables such as `{{ data.first_name }}`, which the form fills in with what they submitted. | [optional] |
|
|
33
33
|
| **signature_request_email_attachments** | [**SignatureRequestEmailAttachments**](SignatureRequestEmailAttachments.md) | How DocSpring's completed emails send the signed PDF to your signers and CCs: `attachment` (attached, or a download link when it's too big to attach) or `link` (a download link). Null uses your account's rule: a link if your account has signed a BAA, otherwise attached. PDF templates only. A signature request uses the value it had when the request was created. | [optional] |
|
|
34
34
|
| **signature_request_from_address** | **String** | The address DocSpring's emails to your signers come from: an address at one of your verified email domains, on the Growth plan or higher. Null sends them from DocSpring's shared address, with "via DocSpring" after the sender name. PDF templates only. | [optional] |
|
|
35
35
|
| **signature_request_include_signing_token** | **Boolean** | Puts a signing token in `signature_request_signing_url`, as `{{ token_id }}` and `{{ token_secret }}`, so your page can open the signing form without creating a token itself. The email then carries a credential: anyone who has it can open the form and sign. PDF templates only. | [optional] |
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
| **signature_request_notification_emails** | **Array<String>** | Who DocSpring tells when a signature request's document is completed or declined, or an email bounces or can't be sent: members of your DocSpring team or addresses at your verified email domains. Empty means your account's owner. A submission's `notification_emails` replaces them. PDF templates only. | [optional] |
|
|
38
38
|
| **signature_request_reply_to** | **String** | Where your signers' replies to DocSpring's emails go: a member of your DocSpring team or an address at one of your verified email domains. Null means your account's owner. A submission's `reply_to` replaces it. PDF templates only. | [optional] |
|
|
39
39
|
| **signature_request_signing_url** | **String** | A page on your own site that the button in DocSpring's email to a signer opens, instead of DocSpring's signing page: an https URL on one of your verified email domains or a subdomain of one, on the Growth plan or higher. It must include `{{ signature_request_id }}`. Your page authenticates the signer, creates a token for the signature request, and opens the signing form with it. Null links to DocSpring's signing page. PDF templates only. | [optional] |
|
|
40
|
+
| **success_title** | **String** | The title of the web form's success screen. When it's null or empty, the screen says "Thanks for filling out" and the template's name. It can have variables such as `{{ data.first_name }}`. | [optional] |
|
|
41
|
+
| **success_message** | **String** | A message under the title of the web form's success screen, as plain text. Line breaks show, and web addresses become links. It can have variables such as `{{ data.first_name }}`. | [optional] |
|
|
42
|
+
| **show_fill_again_button** | **Boolean** | Whether the web form's success screen has a "Fill out again" button, which clears the form so someone can fill it in again. | [optional] |
|
|
40
43
|
| **slack_webhook_url** | **String** | A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; `has_slack_webhook_url` says if it's set. | [optional] |
|
|
41
44
|
| **defaults** | [**TemplateDefaultsInput**](TemplateDefaultsInput.md) | The default style of the template's fields. Setting it replaces the whole object. | [optional] |
|
|
42
45
|
| **field_dependencies** | [**Array<TemplateFieldDependencyInput>**](TemplateFieldDependencyInput.md) | The template's conditional logic rules. Setting them replaces all of the rules. | [optional] |
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
| **field_source** | [**FieldSetupSource**](FieldSetupSource.md) | With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields. | [optional] |
|
|
58
61
|
| **field_naming** | [**FieldSetupNaming**](FieldSetupNaming.md) | With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`. | [optional] |
|
|
59
62
|
| **field_logic** | [**FieldSetupLogic**](FieldSetupLogic.md) | With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings. | [optional] |
|
|
63
|
+
| **include_office_use_fields** | **Boolean** | With `detect_fields`, whether AI field setup keeps the fields that only the office receiving the form fills in, such as a "For office use only" box (`true`), or leaves them out (`false`). Default: your account's template settings. | [optional] |
|
|
60
64
|
|
|
61
65
|
## Example
|
|
62
66
|
|
|
@@ -97,6 +101,9 @@ instance = DocSpring::CreateTemplateRequest.new(
|
|
|
97
101
|
signature_request_notification_emails: null,
|
|
98
102
|
signature_request_reply_to: null,
|
|
99
103
|
signature_request_signing_url: null,
|
|
104
|
+
success_title: null,
|
|
105
|
+
success_message: null,
|
|
106
|
+
show_fill_again_button: null,
|
|
100
107
|
slack_webhook_url: null,
|
|
101
108
|
defaults: null,
|
|
102
109
|
field_dependencies: null,
|
|
@@ -116,7 +123,8 @@ instance = DocSpring::CreateTemplateRequest.new(
|
|
|
116
123
|
detect_fields: null,
|
|
117
124
|
field_source: null,
|
|
118
125
|
field_naming: null,
|
|
119
|
-
field_logic: null
|
|
126
|
+
field_logic: null,
|
|
127
|
+
include_office_use_fields: null
|
|
120
128
|
)
|
|
121
129
|
```
|
|
122
130
|
|
data/docs/ErrorInfo.md
CHANGED
|
@@ -4,17 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **code** | [**ErrorCode**](ErrorCode.md) | A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept. When the first request created a record, its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id` or `
|
|
7
|
+
| **code** | [**ErrorCode**](ErrorCode.md) | A machine-readable error code. Clients should handle codes they don't know: new codes can be added. `invalid_data`: a submission's data doesn't match its template's fields. The submission is still recorded. `insufficient_credits` (402): your credit balance can't cover a live PDF. The record was saved and waits for credits in the `insufficient_credits` state: its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `insufficient_credits_to_send` (402): your credit balance can't cover a live signature request that DocSpring would email, so nothing was saved. Add credits and send the request again. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count), the embedded template editor, email actions, or live signature requests before your account's first payment. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the files weren't ready in time. The record was created and is still being processed: its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id` or `template_id`. Without one of these IDs, the request itself got no answer in time, and the record may or may not have been created. `idempotency_key_in_use` (409): the first request with the same Idempotency-Key is still being processed, and the response has a `Retry-After` header: send the request again then. Without the header, the first request was processed but its response is no longer kept, or it failed after creating or changing a record, and the message says which. When the first request created a record, or changed a template's fields or published a version of it, the message names it, and its ID is in `submission_id`, `submission_batch_id`, `combined_pdf_id`, `template_id`, `folder_id`, `custom_file_id`, `webhook_id`, `email_action_id` or `email_domain_id` (a signature request's events and tokens have no member). `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. `rate_limited` (429): too many API requests. Wait for the `Retry-After` header's seconds. `daily_email_limit_reached` (429): a submission that DocSpring would email would take your account over its daily email limit, so nothing was saved. Send it again after the `Retry-After` header's seconds (midnight UTC), or send the signing links yourself (`send_email: false`). | |
|
|
8
8
|
| **message** | **String** | A human-readable explanation, safe to show to developers. | |
|
|
9
9
|
| **details** | [**Array<ErrorDetail>**](ErrorDetail.md) | What was wrong with each part of the request. Empty when the error isn't about one part of it. | |
|
|
10
10
|
| **request_id** | **String** | The ID of the request. Include it when you contact support. | |
|
|
11
11
|
| **submission_id** | **String** | When a submission's data fails validation, the submission is still recorded (state `invalid_data`) so you can see it in the dashboard. This is its ID. With `insufficient_credits`, the submission that waits for credits. With `polling_timeout`, the submission that's still being processed. With `idempotency_key_in_use`, the submission the first request with the key created. | [optional] |
|
|
12
12
|
| **submission_batch_id** | **String** | The ID of the recorded batch, when items in a batch fail validation. With `insufficient_credits`, the batch whose submissions wait for credits. With `polling_timeout`, the batch that's still being processed. With `idempotency_key_in_use`, the batch the first request with the key created. | [optional] |
|
|
13
13
|
| **combined_pdf_id** | **String** | With `insufficient_credits`, the combined PDF that waits for credits. With `polling_timeout`, the combined PDF that's still being processed. With `idempotency_key_in_use`, the combined PDF the first request with the key created. | [optional] |
|
|
14
|
-
| **template_id** | **String** | With `polling_timeout`, the template whose PDF is still being processed. With `idempotency_key_in_use`, the template the first request with the key created. | [optional] |
|
|
14
|
+
| **template_id** | **String** | With `polling_timeout`, the template whose PDF is still being processed. With `idempotency_key_in_use`, the template the first request with the key created, or whose fields it changed or whose version it published. | [optional] |
|
|
15
15
|
| **folder_id** | **String** | With `idempotency_key_in_use`, the folder the first request with the key created. | [optional] |
|
|
16
16
|
| **custom_file_id** | **String** | With `idempotency_key_in_use`, the custom file the first request with the key created. | [optional] |
|
|
17
17
|
| **webhook_id** | **String** | With `idempotency_key_in_use`, the webhook the first request with the key created. | [optional] |
|
|
18
|
+
| **email_action_id** | **String** | With `idempotency_key_in_use`, the email action the first request with the key created. | [optional] |
|
|
19
|
+
| **email_domain_id** | **String** | With `idempotency_key_in_use`, the email domain the first request with the key created. | [optional] |
|
|
18
20
|
|
|
19
21
|
## Example
|
|
20
22
|
|
|
@@ -32,7 +34,9 @@ instance = DocSpring::ErrorInfo.new(
|
|
|
32
34
|
template_id: null,
|
|
33
35
|
folder_id: null,
|
|
34
36
|
custom_file_id: null,
|
|
35
|
-
webhook_id: null
|
|
37
|
+
webhook_id: null,
|
|
38
|
+
email_action_id: null,
|
|
39
|
+
email_domain_id: null
|
|
36
40
|
)
|
|
37
41
|
```
|
|
38
42
|
|
data/docs/HtmlEngineOptions.md
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **format** | [**PageFormat**](PageFormat.md) | The paper size. `Custom` uses `width` and `height`. | |
|
|
8
|
-
| **width** | **String** | The page width for the `Custom` format, with a unit (`8.5in`, `210mm`). | [optional] |
|
|
9
|
-
| **height** | **String** | The page height for the `Custom` format, with a unit. | [optional] |
|
|
8
|
+
| **width** | **String** | The page width for the `Custom` format, with a unit (`8.5in`, `210mm`), from 0.05in to 200in. | [optional] |
|
|
9
|
+
| **height** | **String** | The page height for the `Custom` format, with a unit, from 0.05in to 200in. | [optional] |
|
|
10
10
|
| **scale** | **Float** | How much to scale the page, from 0.1 to 2, such as `0.8`. `1` prints it at its normal size. | |
|
|
11
11
|
| **landscape** | **Boolean** | Print pages in landscape orientation. | |
|
|
12
12
|
| **print_background** | **Boolean** | Print background colors and images. | |
|
|
13
|
-
| **margin_top** | **String** | The top margin, with a unit, such as `1in` or `20mm`. | |
|
|
13
|
+
| **margin_top** | **String** | The top margin, with a unit, such as `1in` or `20mm`. The top and bottom margins together must be less than the page's height. | |
|
|
14
14
|
| **margin_bottom** | **String** | The bottom margin, with a unit. | |
|
|
15
|
-
| **margin_left** | **String** | The left margin, with a unit. | |
|
|
15
|
+
| **margin_left** | **String** | The left margin, with a unit. The left and right margins together must be less than the page's width. | |
|
|
16
16
|
| **margin_right** | **String** | The right margin, with a unit. | |
|
|
17
17
|
|
|
18
18
|
## Example
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **format** | [**PageFormat**](PageFormat.md) | The paper size. `Custom` uses `width` and `height`. | [optional] |
|
|
8
|
-
| **width** | **String** | The page width for the `Custom` format, with a unit (`8.5in`, `210mm`). | [optional] |
|
|
9
|
-
| **height** | **String** | The page height for the `Custom` format, with a unit. | [optional] |
|
|
8
|
+
| **width** | **String** | The page width for the `Custom` format, with a unit (`8.5in`, `210mm`), from 0.05in to 200in. | [optional] |
|
|
9
|
+
| **height** | **String** | The page height for the `Custom` format, with a unit, from 0.05in to 200in. | [optional] |
|
|
10
10
|
| **scale** | **Float** | How much to scale the page, from 0.1 to 2, such as `0.8`. `1` prints it at its normal size. | [optional] |
|
|
11
11
|
| **landscape** | **Boolean** | Print pages in landscape orientation. | [optional] |
|
|
12
12
|
| **print_background** | **Boolean** | Print background colors and images. | [optional] |
|
|
13
|
-
| **margin_top** | **String** | The top margin, with a unit, such as `1in` or `20mm`. | [optional] |
|
|
13
|
+
| **margin_top** | **String** | The top margin, with a unit, such as `1in` or `20mm`. The top and bottom margins together must be less than the page's height. | [optional] |
|
|
14
14
|
| **margin_bottom** | **String** | The bottom margin, with a unit. | [optional] |
|
|
15
|
-
| **margin_left** | **String** | The left margin, with a unit. | [optional] |
|
|
15
|
+
| **margin_left** | **String** | The left margin, with a unit. The left and right margins together must be less than the page's width. | [optional] |
|
|
16
16
|
| **margin_right** | **String** | The right margin, with a unit. | [optional] |
|
|
17
17
|
|
|
18
18
|
## Example
|
data/docs/SubmissionInput.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. Word documents and OpenDocument files can't be password-protected, so a submission with a password can't make them. | [optional] |
|
|
12
12
|
| **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission. | [optional] |
|
|
13
13
|
| **expires_in** | **Integer** | Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. The demo API token's submissions expire within an hour: up to 3600, and that's their default. | [optional] |
|
|
14
|
-
| **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422.
|
|
14
|
+
| **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. A `default` for a signature or initials field makes the submission `invalid_data`. With `signature_requests`, `editable: true` is a 422. | [optional] |
|
|
15
15
|
| **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
|
|
16
16
|
| **css** | **String** | For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity. | [optional] |
|
|
17
17
|
| **template_id** | **String** | The submission's template. Default the batch's `template_id`. | [optional] |
|
data/docs/Template.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
| **allow_skipping_optional_fields** | **Boolean** | Visual forms and signature request forms show the Continue button as soon as the required fields are filled in, without visiting each optional field. The `allowSkippingOptionalFields` embed option overrides it. | |
|
|
27
27
|
| **default_form_mode** | [**TemplateFormMode**](TemplateFormMode.md) | The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs). Only PDF templates have a visual form, so other templates accept only `web`. | |
|
|
28
28
|
| **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | |
|
|
29
|
-
| **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and
|
|
29
|
+
| **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Each one is stored in lowercase, without a trailing slash. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and Web Forms JS) aren't restricted. | |
|
|
30
30
|
| **embed_edit_allow_settings** | **Boolean** | Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on). | |
|
|
31
31
|
| **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | |
|
|
32
32
|
| **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | |
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
| **parse_dates_using_template_date_format** | **Boolean** | Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML or Word template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. | |
|
|
40
40
|
| **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | |
|
|
41
41
|
| **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | |
|
|
42
|
-
| **redirect_url** | **String** | Where the web form sends people after they submit it. | |
|
|
42
|
+
| **redirect_url** | **String** | Where the web form sends people after they submit it, instead of showing its success screen. After its `?` or `#`, it can have variables such as `{{ data.first_name }}`, which the form fills in with what they submitted. | |
|
|
43
43
|
| **signature_request_email_attachments** | [**SignatureRequestEmailAttachments**](SignatureRequestEmailAttachments.md) | How DocSpring's completed emails send the signed PDF to your signers and CCs: `attachment` (attached, or a download link when it's too big to attach) or `link` (a download link). Null uses your account's rule: a link if your account has signed a BAA, otherwise attached. PDF templates only. A signature request uses the value it had when the request was created. | |
|
|
44
44
|
| **signature_request_from_address** | **String** | The address DocSpring's emails to your signers come from: an address at one of your verified email domains, on the Growth plan or higher. Null sends them from DocSpring's shared address, with "via DocSpring" after the sender name. PDF templates only. | |
|
|
45
45
|
| **signature_request_include_signing_token** | **Boolean** | Puts a signing token in `signature_request_signing_url`, as `{{ token_id }}` and `{{ token_secret }}`, so your page can open the signing form without creating a token itself. The email then carries a credential: anyone who has it can open the form and sign. PDF templates only. | |
|
|
@@ -47,11 +47,15 @@
|
|
|
47
47
|
| **signature_request_notification_emails** | **Array<String>** | Who DocSpring tells when a signature request's document is completed or declined, or an email bounces or can't be sent: members of your DocSpring team or addresses at your verified email domains. Empty means your account's owner. A submission's `notification_emails` replaces them. PDF templates only. | |
|
|
48
48
|
| **signature_request_reply_to** | **String** | Where your signers' replies to DocSpring's emails go: a member of your DocSpring team or an address at one of your verified email domains. Null means your account's owner. A submission's `reply_to` replaces it. PDF templates only. | |
|
|
49
49
|
| **signature_request_signing_url** | **String** | A page on your own site that the button in DocSpring's email to a signer opens, instead of DocSpring's signing page: an https URL on one of your verified email domains or a subdomain of one, on the Growth plan or higher. It must include `{{ signature_request_id }}`. Your page authenticates the signer, creates a token for the signature request, and opens the signing form with it. Null links to DocSpring's signing page. PDF templates only. | |
|
|
50
|
+
| **success_title** | **String** | The title of the web form's success screen. When it's null or empty, the screen says "Thanks for filling out" and the template's name. It can have variables such as `{{ data.first_name }}`. | |
|
|
51
|
+
| **success_message** | **String** | A message under the title of the web form's success screen, as plain text. Line breaks show, and web addresses become links. It can have variables such as `{{ data.first_name }}`. | |
|
|
52
|
+
| **show_fill_again_button** | **Boolean** | Whether the web form's success screen has a "Fill out again" button, which clears the form so someone can fill it in again. | |
|
|
50
53
|
| **has_slack_webhook_url** | **Boolean** | Whether `slack_webhook_url` is set. | |
|
|
51
54
|
| **last_changed_by** | [**TemplateActor**](TemplateActor.md) | Who last changed the draft: a user in your account, an API token, or someone using the embedded template editor. Null if no change has been recorded. | |
|
|
52
55
|
| **defaults** | [**TemplateDefaults**](TemplateDefaults.md) | | |
|
|
53
56
|
| **field_dependencies** | [**Array<TemplateFieldDependency>**](TemplateFieldDependency.md) | Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields. | |
|
|
54
57
|
| **field_groups** | [**Array<FieldGroup>**](FieldGroup.md) | The groups of the template's fields, with their settings. A field's name puts it in groups: `address/city` is in the group `address`, and `items/0/price` is in the list `items` and its items' group `items/~`. | |
|
|
58
|
+
| **form_sections** | [**Array<TemplateFormSection>**](TemplateFormSection.md) | The web form's sections, in order: Web Forms JS and the hosted web form show one section at a time. Empty when the template has none, and the web form shows all of its fields together, in the order the fields endpoint lists them. A field that no section lists (one added later) goes after the field before it in that order, in that field's section. | |
|
|
55
59
|
| **predefined_fields** | [**Array<PredefinedField>**](PredefinedField.md) | The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off. | |
|
|
56
60
|
| **predefined_fields_sample_data** | **Hash<String, Object>** | Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for. | |
|
|
57
61
|
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for other templates. | |
|
|
@@ -113,11 +117,15 @@ instance = DocSpring::Template.new(
|
|
|
113
117
|
signature_request_notification_emails: null,
|
|
114
118
|
signature_request_reply_to: null,
|
|
115
119
|
signature_request_signing_url: null,
|
|
120
|
+
success_title: null,
|
|
121
|
+
success_message: null,
|
|
122
|
+
show_fill_again_button: null,
|
|
116
123
|
has_slack_webhook_url: null,
|
|
117
124
|
last_changed_by: null,
|
|
118
125
|
defaults: null,
|
|
119
126
|
field_dependencies: null,
|
|
120
127
|
field_groups: null,
|
|
128
|
+
form_sections: null,
|
|
121
129
|
predefined_fields: null,
|
|
122
130
|
predefined_fields_sample_data: null,
|
|
123
131
|
html: null,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DocSpring::TemplateFormSection
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | The section's ID, unique among the template's sections. Any string you choose. | |
|
|
8
|
+
| **title** | **String** | The section's heading on the web form. | |
|
|
9
|
+
| **description** | **String** | Text shown under the section's heading. Null for none. | |
|
|
10
|
+
| **field_ids** | **Array<Integer>** | The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'docspring'
|
|
16
|
+
|
|
17
|
+
instance = DocSpring::TemplateFormSection.new(
|
|
18
|
+
id: null,
|
|
19
|
+
title: null,
|
|
20
|
+
description: null,
|
|
21
|
+
field_ids: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DocSpring::TemplateFormSectionInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | The section's ID, unique among the template's sections. Any string you choose. | |
|
|
8
|
+
| **title** | **String** | The section's heading on the web form. | |
|
|
9
|
+
| **description** | **String** | Text shown under the section's heading. Null for none. | [optional] |
|
|
10
|
+
| **field_ids** | **Array<Integer>** | The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'docspring'
|
|
16
|
+
|
|
17
|
+
instance = DocSpring::TemplateFormSectionInput.new(
|
|
18
|
+
id: null,
|
|
19
|
+
title: null,
|
|
20
|
+
description: null,
|
|
21
|
+
field_ids: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
| **allow_skipping_optional_fields** | **Boolean** | Visual forms and signature request forms show the Continue button as soon as the required fields are filled in, without visiting each optional field. The `allowSkippingOptionalFields` embed option overrides it. | [optional] |
|
|
16
16
|
| **default_form_mode** | [**TemplateFormMode**](TemplateFormMode.md) | The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs). Only PDF templates have a visual form, so other templates accept only `web`. | [optional] |
|
|
17
17
|
| **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | [optional] |
|
|
18
|
-
| **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and
|
|
18
|
+
| **embed_domains** | **Array<String>** | The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work), without a path. Each one is stored in lowercase, without a trailing slash. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and Web Forms JS) aren't restricted. | [optional] |
|
|
19
19
|
| **embed_edit_allow_settings** | **Boolean** | Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on). | [optional] |
|
|
20
20
|
| **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | [optional] |
|
|
21
21
|
| **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | [optional] |
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
| **parse_dates_using_template_date_format** | **Boolean** | Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML or Word template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. | [optional] |
|
|
29
29
|
| **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | [optional] |
|
|
30
30
|
| **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | [optional] |
|
|
31
|
-
| **redirect_url** | **String** | Where the web form sends people after they submit it. | [optional] |
|
|
31
|
+
| **redirect_url** | **String** | Where the web form sends people after they submit it, instead of showing its success screen. After its `?` or `#`, it can have variables such as `{{ data.first_name }}`, which the form fills in with what they submitted. | [optional] |
|
|
32
32
|
| **signature_request_email_attachments** | [**SignatureRequestEmailAttachments**](SignatureRequestEmailAttachments.md) | How DocSpring's completed emails send the signed PDF to your signers and CCs: `attachment` (attached, or a download link when it's too big to attach) or `link` (a download link). Null uses your account's rule: a link if your account has signed a BAA, otherwise attached. PDF templates only. A signature request uses the value it had when the request was created. | [optional] |
|
|
33
33
|
| **signature_request_from_address** | **String** | The address DocSpring's emails to your signers come from: an address at one of your verified email domains, on the Growth plan or higher. Null sends them from DocSpring's shared address, with "via DocSpring" after the sender name. PDF templates only. | [optional] |
|
|
34
34
|
| **signature_request_include_signing_token** | **Boolean** | Puts a signing token in `signature_request_signing_url`, as `{{ token_id }}` and `{{ token_secret }}`, so your page can open the signing form without creating a token itself. The email then carries a credential: anyone who has it can open the form and sign. PDF templates only. | [optional] |
|
|
@@ -36,10 +36,14 @@
|
|
|
36
36
|
| **signature_request_notification_emails** | **Array<String>** | Who DocSpring tells when a signature request's document is completed or declined, or an email bounces or can't be sent: members of your DocSpring team or addresses at your verified email domains. Empty means your account's owner. A submission's `notification_emails` replaces them. PDF templates only. | [optional] |
|
|
37
37
|
| **signature_request_reply_to** | **String** | Where your signers' replies to DocSpring's emails go: a member of your DocSpring team or an address at one of your verified email domains. Null means your account's owner. A submission's `reply_to` replaces it. PDF templates only. | [optional] |
|
|
38
38
|
| **signature_request_signing_url** | **String** | A page on your own site that the button in DocSpring's email to a signer opens, instead of DocSpring's signing page: an https URL on one of your verified email domains or a subdomain of one, on the Growth plan or higher. It must include `{{ signature_request_id }}`. Your page authenticates the signer, creates a token for the signature request, and opens the signing form with it. Null links to DocSpring's signing page. PDF templates only. | [optional] |
|
|
39
|
+
| **success_title** | **String** | The title of the web form's success screen. When it's null or empty, the screen says "Thanks for filling out" and the template's name. It can have variables such as `{{ data.first_name }}`. | [optional] |
|
|
40
|
+
| **success_message** | **String** | A message under the title of the web form's success screen, as plain text. Line breaks show, and web addresses become links. It can have variables such as `{{ data.first_name }}`. | [optional] |
|
|
41
|
+
| **show_fill_again_button** | **Boolean** | Whether the web form's success screen has a "Fill out again" button, which clears the form so someone can fill it in again. | [optional] |
|
|
39
42
|
| **slack_webhook_url** | **String** | A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; `has_slack_webhook_url` says if it's set. | [optional] |
|
|
40
43
|
| **defaults** | [**TemplateDefaultsInput**](TemplateDefaultsInput.md) | The default style of the template's fields. Setting it replaces the whole object. | [optional] |
|
|
41
44
|
| **field_dependencies** | [**Array<TemplateFieldDependencyInput>**](TemplateFieldDependencyInput.md) | The template's conditional logic rules. Setting them replaces all of the rules. | [optional] |
|
|
42
45
|
| **field_groups** | [**Array<FieldGroupInput>**](FieldGroupInput.md) | Changes to the settings of the template's field groups, each with the `name` of the group it changes. Settings left out keep their values, and groups left out are unchanged. | [optional] |
|
|
46
|
+
| **form_sections** | [**Array<TemplateFormSectionInput>**](TemplateFormSectionInput.md) | The web form's sections, in order. Setting them replaces all of the sections; an empty list removes them. | [optional] |
|
|
43
47
|
| **predefined_fields** | [**Array<PredefinedFieldInput>**](PredefinedFieldInput.md) | The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off. | [optional] |
|
|
44
48
|
| **predefined_fields_sample_data** | **Hash<String, Object>** | Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for. | [optional] |
|
|
45
49
|
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for other templates. | [optional] |
|
|
@@ -88,10 +92,14 @@ instance = DocSpring::UpdateTemplateRequest.new(
|
|
|
88
92
|
signature_request_notification_emails: null,
|
|
89
93
|
signature_request_reply_to: null,
|
|
90
94
|
signature_request_signing_url: null,
|
|
95
|
+
success_title: null,
|
|
96
|
+
success_message: null,
|
|
97
|
+
show_fill_again_button: null,
|
|
91
98
|
slack_webhook_url: null,
|
|
92
99
|
defaults: null,
|
|
93
100
|
field_dependencies: null,
|
|
94
101
|
field_groups: null,
|
|
102
|
+
form_sections: null,
|
|
95
103
|
predefined_fields: null,
|
|
96
104
|
predefined_fields_sample_data: null,
|
|
97
105
|
html: null,
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live. | [optional] |
|
|
8
8
|
| **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | [optional] |
|
|
9
|
-
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). | [optional] |
|
|
9
|
+
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). Signatures come only from signature requests: a value for a signature or initials field makes the submission `invalid_data`, in test mode too. To print an image or a name you send, use an Image or Text field. | [optional] |
|
|
10
10
|
| **metadata** | **Hash<String, Object>** | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`). | [optional] |
|
|
11
11
|
| **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. Word documents and OpenDocument files can't be password-protected, so a submission with a password can't make them. | [optional] |
|
|
12
12
|
| **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission. | [optional] |
|
|
13
13
|
| **expires_in** | **Integer** | Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. The demo API token's submissions expire within an hour: up to 3600, and that's their default. | [optional] |
|
|
14
|
-
| **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422.
|
|
14
|
+
| **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. A `default` for a signature or initials field makes the submission `invalid_data`. With `signature_requests`, `editable: true` is a 422. | [optional] |
|
|
15
15
|
| **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
|
|
16
16
|
| **css** | **String** | For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity. | [optional] |
|
|
17
|
-
| **signature_requests** | [**Array<SignatureRequestInput>**](SignatureRequestInput.md) | The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out.
|
|
17
|
+
| **signature_requests** | [**Array<SignatureRequestInput>**](SignatureRequestInput.md) | The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out. | [optional] |
|
|
18
18
|
| **send_email** | **Boolean** | Whether DocSpring emails the signers their signing links, and sends the reminders and the completed document. Default true. Each signature request's own `send_email` overrides it. A test submission only emails your DocSpring team: every other address is a 422. `true` needs `signature_requests`. DocSpring doesn't email the signers of a form library template: leave `send_email` out, and send them their links yourself. | [optional] |
|
|
19
19
|
| **signing_order** | [**SigningOrder**](SigningOrder.md) | `parallel` (the default): everyone can sign at once. `sequential`: people sign one step at a time (`signing_step`), and DocSpring emails each step when the one before it is done. Needs `signature_requests`. | [optional] |
|
|
20
20
|
| **email_subject** | **String** | The subject of the emails that ask people to sign. You can use `{{ signer.name }}`, `{{ signer.email }}`, `{{ document.name }}`, `{{ sender.name }}` and `{{ account.name }}`. Default "<sender> sent you <document> to sign" when you leave it out (a blank subject is a 422). Links and web addresses are shown as plain text (`example[.]com`). | [optional] |
|