docspring 4.2.0 → 4.3.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/.travis.yml +1 -1
- data/AGENTS.md +2 -2
- data/CHANGELOG.md +27 -0
- data/Gemfile.lock +4 -3
- data/README.md +7 -6
- data/docs/Client.md +104 -102
- data/docs/CreateSubmissionRequest.md +3 -3
- data/docs/CreateTemplateRequest.md +11 -9
- data/docs/ErrorInfo.md +1 -1
- data/docs/FieldGroup.md +2 -2
- data/docs/FieldGroupInput.md +1 -1
- data/docs/GenerateSubmissionFilesRequest.md +1 -1
- data/docs/GeneratedFile.md +2 -2
- data/docs/Submission.md +4 -4
- data/docs/SubmissionBatch.md +3 -3
- data/docs/SubmissionFiles.md +4 -0
- data/docs/SubmissionInput.md +3 -3
- data/docs/SubmissionSummary.md +2 -2
- data/docs/Template.md +10 -8
- data/docs/TemplateDiff.md +2 -2
- data/docs/TemplateDocument.md +10 -10
- data/docs/TemplateDocumentSummary.md +4 -4
- data/docs/TemplatePreview.md +1 -1
- data/docs/TemplateSummary.md +5 -3
- data/docs/UpdateTemplateDocumentRequest.md +5 -5
- data/docs/UpdateTemplateRequest.md +6 -4
- data/docs/ValidateSubmissionRequest.md +3 -3
- data/docspring.gemspec +2 -2
- data/lib/docspring/api/client.rb +50 -47
- data/lib/docspring/api_client.rb +2 -2
- data/lib/docspring/api_error.rb +1 -1
- data/lib/docspring/api_model_base.rb +1 -1
- data/lib/docspring/configuration.rb +1 -1
- data/lib/docspring/models/add_template_fields_request.rb +1 -1
- data/lib/docspring/models/ai_field_naming_language.rb +1 -1
- data/lib/docspring/models/authentication_check.rb +1 -1
- data/lib/docspring/models/barcode_symbology.rb +1 -1
- data/lib/docspring/models/check_character.rb +1 -1
- data/lib/docspring/models/combined_field_type.rb +1 -1
- data/lib/docspring/models/combined_pdf.rb +1 -1
- data/lib/docspring/models/combined_pdf_files.rb +1 -1
- data/lib/docspring/models/combined_pdf_list.rb +1 -1
- data/lib/docspring/models/combined_pdf_source.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_input.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_pdf.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_type.rb +1 -1
- data/lib/docspring/models/combined_pdf_state.rb +1 -1
- data/lib/docspring/models/copy_template_request.rb +1 -1
- data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
- data/lib/docspring/models/create_custom_file_from_upload_request.rb +1 -1
- data/lib/docspring/models/create_folder_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_event_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_token_request.rb +1 -1
- data/lib/docspring/models/create_submission_batch_request.rb +1 -1
- data/lib/docspring/models/create_submission_request.rb +4 -4
- data/lib/docspring/models/create_template_preview_request.rb +1 -1
- data/lib/docspring/models/create_template_request.rb +21 -11
- data/lib/docspring/models/create_webhook_request.rb +1 -1
- data/lib/docspring/models/custom_file.rb +1 -1
- data/lib/docspring/models/custom_file_list.rb +1 -1
- data/lib/docspring/models/custom_file_source_pdf.rb +1 -1
- data/lib/docspring/models/error_code.rb +1 -1
- data/lib/docspring/models/error_detail.rb +1 -1
- data/lib/docspring/models/error_info.rb +2 -2
- data/lib/docspring/models/error_response.rb +1 -1
- data/lib/docspring/models/expiration_interval.rb +1 -1
- data/lib/docspring/models/field.rb +2 -2
- data/lib/docspring/models/field_comparison_condition.rb +1 -1
- data/lib/docspring/models/field_comparison_operator.rb +1 -1
- data/lib/docspring/models/field_dependency.rb +1 -1
- data/lib/docspring/models/field_dependency_input.rb +1 -1
- data/lib/docspring/models/field_display_type.rb +1 -1
- data/lib/docspring/models/field_equals_condition.rb +1 -1
- data/lib/docspring/models/field_equals_operator.rb +1 -1
- data/lib/docspring/models/field_group.rb +3 -3
- data/lib/docspring/models/field_group_input.rb +2 -2
- data/lib/docspring/models/field_group_type.rb +1 -1
- data/lib/docspring/models/field_in_condition.rb +1 -1
- data/lib/docspring/models/field_input.rb +2 -2
- data/lib/docspring/models/field_override.rb +1 -1
- data/lib/docspring/models/field_presence_condition.rb +1 -1
- data/lib/docspring/models/field_presence_operator.rb +1 -1
- data/lib/docspring/models/field_range_condition.rb +1 -1
- data/lib/docspring/models/field_reimport_state.rb +1 -1
- data/lib/docspring/models/field_setup_logic.rb +1 -1
- data/lib/docspring/models/field_setup_naming.rb +1 -1
- data/lib/docspring/models/field_setup_source.rb +1 -1
- data/lib/docspring/models/field_type.rb +1 -1
- data/lib/docspring/models/folder.rb +1 -1
- data/lib/docspring/models/folder_list.rb +1 -1
- data/lib/docspring/models/generate_files_format.rb +5 -2
- data/lib/docspring/models/generate_submission_files_request.rb +2 -2
- data/lib/docspring/models/generated_file.rb +4 -4
- data/lib/docspring/models/generated_file_state.rb +1 -1
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/image_gravity.rb +1 -1
- data/lib/docspring/models/image_scale_type.rb +1 -1
- data/lib/docspring/models/model_code_language.rb +3 -2
- data/lib/docspring/models/move_folder_request.rb +1 -1
- data/lib/docspring/models/move_template_request.rb +1 -1
- data/lib/docspring/models/number_condition_type.rb +1 -1
- data/lib/docspring/models/output_format.rb +4 -2
- data/lib/docspring/models/page_format.rb +1 -1
- data/lib/docspring/models/page_image.rb +1 -1
- data/lib/docspring/models/page_images.rb +1 -1
- data/lib/docspring/models/predefined_field.rb +1 -1
- data/lib/docspring/models/predefined_field_input.rb +1 -1
- data/lib/docspring/models/publish_template_version_request.rb +1 -1
- data/lib/docspring/models/remove_template_fields_request.rb +1 -1
- data/lib/docspring/models/rename_folder_request.rb +1 -1
- data/lib/docspring/models/reorder_template_fields_request.rb +1 -1
- data/lib/docspring/models/restore_template_version_request.rb +1 -1
- data/lib/docspring/models/shape_type.rb +1 -1
- data/lib/docspring/models/signature_request.rb +1 -1
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +1 -1
- data/lib/docspring/models/signature_request_auth_type.rb +1 -1
- data/lib/docspring/models/signature_request_event.rb +1 -1
- data/lib/docspring/models/signature_request_event_type.rb +1 -1
- data/lib/docspring/models/signature_request_input.rb +1 -1
- data/lib/docspring/models/signature_request_message_type.rb +1 -1
- data/lib/docspring/models/signature_request_state.rb +1 -1
- data/lib/docspring/models/signature_request_token.rb +1 -1
- data/lib/docspring/models/signature_request_token_type.rb +1 -1
- data/lib/docspring/models/string_condition_type.rb +1 -1
- data/lib/docspring/models/submission.rb +6 -6
- data/lib/docspring/models/submission_action.rb +1 -1
- data/lib/docspring/models/submission_action_state.rb +1 -1
- data/lib/docspring/models/submission_action_type.rb +1 -1
- data/lib/docspring/models/submission_batch.rb +5 -5
- data/lib/docspring/models/submission_batch_state.rb +1 -1
- data/lib/docspring/models/submission_files.rb +22 -2
- data/lib/docspring/models/submission_input.rb +4 -4
- data/lib/docspring/models/submission_list.rb +1 -1
- data/lib/docspring/models/submission_source.rb +1 -1
- data/lib/docspring/models/submission_source_pdf.rb +1 -1
- data/lib/docspring/models/submission_state.rb +1 -1
- data/lib/docspring/models/submission_summary.rb +3 -3
- data/lib/docspring/models/submission_validation.rb +1 -1
- data/lib/docspring/models/template.rb +37 -10
- data/lib/docspring/models/template_actor.rb +1 -1
- data/lib/docspring/models/template_actor_type.rb +1 -1
- data/lib/docspring/models/template_defaults.rb +1 -1
- data/lib/docspring/models/template_defaults_input.rb +1 -1
- data/lib/docspring/models/template_diff.rb +3 -3
- data/lib/docspring/models/template_diff_summary.rb +1 -1
- data/lib/docspring/models/template_document.rb +12 -12
- data/lib/docspring/models/template_document_state.rb +4 -2
- data/lib/docspring/models/template_document_summary.rb +6 -6
- data/lib/docspring/models/template_field_change.rb +1 -1
- data/lib/docspring/models/template_field_changes.rb +1 -1
- data/lib/docspring/models/template_field_dependency.rb +1 -1
- data/lib/docspring/models/template_field_dependency_action.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_match.rb +1 -1
- data/lib/docspring/models/template_field_dependency_operator.rb +1 -1
- data/lib/docspring/models/template_field_logic_status.rb +1 -1
- data/lib/docspring/models/template_field_move.rb +1 -1
- data/lib/docspring/models/template_fields.rb +1 -1
- data/lib/docspring/models/template_form_mode.rb +1 -1
- data/lib/docspring/models/template_model_code.rb +1 -1
- data/lib/docspring/models/template_page_ai_error.rb +1 -1
- data/lib/docspring/models/template_page_ai_naming_status.rb +1 -1
- data/lib/docspring/models/template_page_fields_status.rb +1 -1
- data/lib/docspring/models/template_page_image_status.rb +1 -1
- data/lib/docspring/models/template_page_images.rb +1 -1
- data/lib/docspring/models/template_page_processing_status.rb +1 -1
- data/lib/docspring/models/template_preview.rb +3 -3
- data/lib/docspring/models/template_preview_state.rb +1 -1
- data/lib/docspring/models/template_source_pdf.rb +1 -1
- data/lib/docspring/models/template_summary.rb +32 -5
- data/lib/docspring/models/template_summary_list.rb +1 -1
- data/lib/docspring/models/template_type.rb +3 -2
- data/lib/docspring/models/template_version.rb +1 -1
- data/lib/docspring/models/template_version_type.rb +1 -1
- data/lib/docspring/models/text_alignment.rb +1 -1
- data/lib/docspring/models/text_overflow.rb +1 -1
- data/lib/docspring/models/text_vertical_alignment.rb +1 -1
- data/lib/docspring/models/typeface.rb +1 -1
- data/lib/docspring/models/update_signature_request_request.rb +1 -1
- data/lib/docspring/models/update_template_document_request.rb +7 -7
- data/lib/docspring/models/update_template_fields_request.rb +1 -1
- data/lib/docspring/models/update_template_request.rb +16 -6
- data/lib/docspring/models/update_webhook_request.rb +1 -1
- data/lib/docspring/models/upload_method.rb +1 -1
- data/lib/docspring/models/upload_presign.rb +1 -1
- data/lib/docspring/models/url_source_pdf.rb +1 -1
- data/lib/docspring/models/validate_submission_request.rb +4 -4
- data/lib/docspring/models/webhook.rb +1 -1
- data/lib/docspring/models/webhook_event_type.rb +1 -1
- data/lib/docspring/models/webhook_list.rb +1 -1
- data/lib/docspring/models/webhook_mode.rb +1 -1
- data/lib/docspring/request_schemas.json +39 -2
- data/lib/docspring/version.rb +2 -2
- data/lib/docspring.rb +1 -1
- data/spec/api/client_spec.rb +25 -24
- data/spec/models/add_template_fields_request_spec.rb +1 -1
- data/spec/models/ai_field_naming_language_spec.rb +1 -1
- data/spec/models/authentication_check_spec.rb +1 -1
- data/spec/models/barcode_symbology_spec.rb +1 -1
- data/spec/models/check_character_spec.rb +1 -1
- data/spec/models/combined_field_type_spec.rb +1 -1
- data/spec/models/combined_pdf_files_spec.rb +1 -1
- data/spec/models/combined_pdf_list_spec.rb +1 -1
- data/spec/models/combined_pdf_source_input_spec.rb +1 -1
- data/spec/models/combined_pdf_source_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_source_spec.rb +1 -1
- data/spec/models/combined_pdf_source_type_spec.rb +1 -1
- data/spec/models/combined_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_state_spec.rb +1 -1
- data/spec/models/copy_template_request_spec.rb +1 -1
- data/spec/models/create_combined_pdf_request_spec.rb +1 -1
- data/spec/models/create_custom_file_from_upload_request_spec.rb +1 -1
- data/spec/models/create_folder_request_spec.rb +1 -1
- data/spec/models/create_signature_request_event_request_spec.rb +1 -1
- data/spec/models/create_signature_request_token_request_spec.rb +1 -1
- data/spec/models/create_submission_batch_request_spec.rb +1 -1
- data/spec/models/create_submission_request_spec.rb +1 -1
- data/spec/models/create_template_preview_request_spec.rb +1 -1
- data/spec/models/create_template_request_spec.rb +7 -1
- data/spec/models/create_webhook_request_spec.rb +1 -1
- data/spec/models/custom_file_list_spec.rb +1 -1
- data/spec/models/custom_file_source_pdf_spec.rb +1 -1
- data/spec/models/custom_file_spec.rb +1 -1
- data/spec/models/error_code_spec.rb +1 -1
- data/spec/models/error_detail_spec.rb +1 -1
- data/spec/models/error_info_spec.rb +1 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/expiration_interval_spec.rb +1 -1
- data/spec/models/field_comparison_condition_spec.rb +1 -1
- data/spec/models/field_comparison_operator_spec.rb +1 -1
- data/spec/models/field_dependency_input_spec.rb +1 -1
- data/spec/models/field_dependency_spec.rb +1 -1
- data/spec/models/field_display_type_spec.rb +1 -1
- data/spec/models/field_equals_condition_spec.rb +1 -1
- data/spec/models/field_equals_operator_spec.rb +1 -1
- data/spec/models/field_group_input_spec.rb +1 -1
- data/spec/models/field_group_spec.rb +1 -1
- data/spec/models/field_group_type_spec.rb +1 -1
- data/spec/models/field_in_condition_spec.rb +1 -1
- data/spec/models/field_input_spec.rb +1 -1
- data/spec/models/field_override_spec.rb +1 -1
- data/spec/models/field_presence_condition_spec.rb +1 -1
- data/spec/models/field_presence_operator_spec.rb +1 -1
- data/spec/models/field_range_condition_spec.rb +1 -1
- data/spec/models/field_reimport_state_spec.rb +1 -1
- data/spec/models/field_setup_logic_spec.rb +1 -1
- data/spec/models/field_setup_naming_spec.rb +1 -1
- data/spec/models/field_setup_source_spec.rb +1 -1
- data/spec/models/field_spec.rb +1 -1
- data/spec/models/field_type_spec.rb +1 -1
- data/spec/models/folder_list_spec.rb +1 -1
- data/spec/models/folder_spec.rb +1 -1
- data/spec/models/generate_files_format_spec.rb +1 -1
- data/spec/models/generate_submission_files_request_spec.rb +1 -1
- data/spec/models/generated_file_spec.rb +1 -1
- data/spec/models/generated_file_state_spec.rb +1 -1
- data/spec/models/html_engine_options_input_spec.rb +1 -1
- data/spec/models/html_engine_options_spec.rb +1 -1
- data/spec/models/image_gravity_spec.rb +1 -1
- data/spec/models/image_scale_type_spec.rb +1 -1
- data/spec/models/model_code_language_spec.rb +1 -1
- data/spec/models/move_folder_request_spec.rb +1 -1
- data/spec/models/move_template_request_spec.rb +1 -1
- data/spec/models/number_condition_type_spec.rb +1 -1
- data/spec/models/output_format_spec.rb +1 -1
- data/spec/models/page_format_spec.rb +1 -1
- data/spec/models/page_image_spec.rb +1 -1
- data/spec/models/page_images_spec.rb +1 -1
- data/spec/models/predefined_field_input_spec.rb +1 -1
- data/spec/models/predefined_field_spec.rb +1 -1
- data/spec/models/publish_template_version_request_spec.rb +1 -1
- data/spec/models/remove_template_fields_request_spec.rb +1 -1
- data/spec/models/rename_folder_request_spec.rb +1 -1
- data/spec/models/reorder_template_fields_request_spec.rb +1 -1
- data/spec/models/restore_template_version_request_spec.rb +1 -1
- data/spec/models/shape_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_type_spec.rb +1 -1
- data/spec/models/signature_request_event_spec.rb +1 -1
- data/spec/models/signature_request_event_type_spec.rb +1 -1
- data/spec/models/signature_request_input_spec.rb +1 -1
- data/spec/models/signature_request_message_type_spec.rb +1 -1
- data/spec/models/signature_request_spec.rb +1 -1
- data/spec/models/signature_request_state_spec.rb +1 -1
- data/spec/models/signature_request_token_spec.rb +1 -1
- data/spec/models/signature_request_token_type_spec.rb +1 -1
- data/spec/models/string_condition_type_spec.rb +1 -1
- data/spec/models/submission_action_spec.rb +1 -1
- data/spec/models/submission_action_state_spec.rb +1 -1
- data/spec/models/submission_action_type_spec.rb +1 -1
- data/spec/models/submission_batch_spec.rb +1 -1
- data/spec/models/submission_batch_state_spec.rb +1 -1
- data/spec/models/submission_files_spec.rb +13 -1
- data/spec/models/submission_input_spec.rb +1 -1
- data/spec/models/submission_list_spec.rb +1 -1
- data/spec/models/submission_source_pdf_spec.rb +1 -1
- data/spec/models/submission_source_spec.rb +1 -1
- data/spec/models/submission_spec.rb +1 -1
- data/spec/models/submission_state_spec.rb +1 -1
- data/spec/models/submission_summary_spec.rb +1 -1
- data/spec/models/submission_validation_spec.rb +1 -1
- data/spec/models/template_actor_spec.rb +1 -1
- data/spec/models/template_actor_type_spec.rb +1 -1
- data/spec/models/template_defaults_input_spec.rb +1 -1
- data/spec/models/template_defaults_spec.rb +1 -1
- data/spec/models/template_diff_spec.rb +1 -1
- data/spec/models/template_diff_summary_spec.rb +1 -1
- data/spec/models/template_document_spec.rb +1 -1
- data/spec/models/template_document_state_spec.rb +1 -1
- data/spec/models/template_document_summary_spec.rb +1 -1
- data/spec/models/template_field_change_spec.rb +1 -1
- data/spec/models/template_field_changes_spec.rb +1 -1
- data/spec/models/template_field_dependency_action_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_spec.rb +1 -1
- data/spec/models/template_field_dependency_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_match_spec.rb +1 -1
- data/spec/models/template_field_dependency_operator_spec.rb +1 -1
- data/spec/models/template_field_dependency_spec.rb +1 -1
- data/spec/models/template_field_logic_status_spec.rb +1 -1
- data/spec/models/template_field_move_spec.rb +1 -1
- data/spec/models/template_fields_spec.rb +1 -1
- data/spec/models/template_form_mode_spec.rb +1 -1
- data/spec/models/template_model_code_spec.rb +1 -1
- data/spec/models/template_page_ai_error_spec.rb +1 -1
- data/spec/models/template_page_ai_naming_status_spec.rb +1 -1
- data/spec/models/template_page_fields_status_spec.rb +1 -1
- data/spec/models/template_page_image_status_spec.rb +1 -1
- data/spec/models/template_page_images_spec.rb +1 -1
- data/spec/models/template_page_processing_status_spec.rb +1 -1
- data/spec/models/template_preview_spec.rb +1 -1
- data/spec/models/template_preview_state_spec.rb +1 -1
- data/spec/models/template_source_pdf_spec.rb +1 -1
- data/spec/models/template_spec.rb +7 -1
- data/spec/models/template_summary_list_spec.rb +1 -1
- data/spec/models/template_summary_spec.rb +7 -1
- data/spec/models/template_type_spec.rb +1 -1
- data/spec/models/template_version_spec.rb +1 -1
- data/spec/models/template_version_type_spec.rb +1 -1
- data/spec/models/text_alignment_spec.rb +1 -1
- data/spec/models/text_overflow_spec.rb +1 -1
- data/spec/models/text_vertical_alignment_spec.rb +1 -1
- data/spec/models/typeface_spec.rb +1 -1
- data/spec/models/update_signature_request_request_spec.rb +1 -1
- data/spec/models/update_template_document_request_spec.rb +1 -1
- data/spec/models/update_template_fields_request_spec.rb +1 -1
- data/spec/models/update_template_request_spec.rb +7 -1
- data/spec/models/update_webhook_request_spec.rb +1 -1
- data/spec/models/upload_method_spec.rb +1 -1
- data/spec/models/upload_presign_spec.rb +1 -1
- data/spec/models/url_source_pdf_spec.rb +1 -1
- data/spec/models/validate_submission_request_spec.rb +1 -1
- data/spec/models/webhook_event_type_spec.rb +1 -1
- data/spec/models/webhook_list_spec.rb +1 -1
- data/spec/models/webhook_mode_spec.rb +1 -1
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +3 -2
|
@@ -6,10 +6,10 @@
|
|
|
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. | [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
|
|
9
|
+
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF and Word templates, unless `signature_requests` collects them (PDF templates only). | [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
|
-
| **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. | [optional] |
|
|
12
|
-
| **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission. | [optional] |
|
|
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
|
+
| **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. | [optional] |
|
|
14
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. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`. | [optional] |
|
|
15
15
|
| **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
|
|
@@ -6,26 +6,27 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **name** | **String** | The template's name. | [optional] |
|
|
8
8
|
| **description** | **String** | Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests. | [optional] |
|
|
9
|
-
| **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created. | |
|
|
9
|
+
| **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created. | |
|
|
10
|
+
| **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | [optional] |
|
|
10
11
|
| **parent_folder_id** | **String** | The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions. | [optional] |
|
|
11
12
|
| **locked** | **Boolean** | A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed). | [optional] |
|
|
12
13
|
| **add_signature_request_submission_id_footers** | **Boolean** | Print the submission ID in the footer of each page of PDFs signed through signature requests. | [optional] |
|
|
13
14
|
| **ai_field_naming_language** | [**AiFieldNamingLanguage**](AiFieldNamingLanguage.md) | The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates. | [optional] |
|
|
14
15
|
| **allow_additional_properties** | **Boolean** | Accept submission data with properties that aren't fields of the template. | [optional] |
|
|
15
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] |
|
|
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).
|
|
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] |
|
|
17
18
|
| **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | [optional] |
|
|
18
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). 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 the simple form) aren't restricted. | [optional] |
|
|
19
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] |
|
|
20
21
|
| **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | [optional] |
|
|
21
22
|
| **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | [optional] |
|
|
22
|
-
| **encrypt_pdfs** | **Boolean** | Encrypt generated PDFs with `encrypt_pdfs_password`. | [optional] |
|
|
23
|
+
| **encrypt_pdfs** | **Boolean** | Encrypt generated PDFs with `encrypt_pdfs_password`. A Word template can only encrypt its PDFs when its `output_format` is `pdf`, because Word documents and OpenDocument files can't be password-protected. | [optional] |
|
|
23
24
|
| **encrypt_pdfs_password** | **String** | The password that opens encrypted PDFs. It's never returned; `has_encrypt_pdfs_password` says if it's set. | [optional] |
|
|
24
25
|
| **expire_submissions** | **Boolean** | Delete each submission's data and PDF after `expire_after` `expiration_interval`. | [optional] |
|
|
25
26
|
| **expire_after** | **Integer** | How many `expiration_interval`s a submission's data and PDF are kept for, when `expire_submissions` is on. At most 5256000 (10 years in minutes). | [optional] |
|
|
26
27
|
| **expiration_interval** | [**ExpirationInterval**](ExpirationInterval.md) | The unit of `expire_after`. | [optional] |
|
|
27
28
|
| **merge_audit_trail_pdf** | **Boolean** | Add the audit trail to the end of PDFs signed through signature requests. | [optional] |
|
|
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 template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. | [optional] |
|
|
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] |
|
|
29
30
|
| **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | [optional] |
|
|
30
31
|
| **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | [optional] |
|
|
31
32
|
| **redirect_url** | **String** | Where the web form sends people after they submit it. | [optional] |
|
|
@@ -34,16 +35,16 @@
|
|
|
34
35
|
| **field_dependencies** | [**Array<TemplateFieldDependencyInput>**](TemplateFieldDependencyInput.md) | The template's conditional logic rules. Setting them replaces all of the rules. | [optional] |
|
|
35
36
|
| **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] |
|
|
36
37
|
| **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] |
|
|
37
|
-
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF templates. | [optional] |
|
|
38
|
+
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF and Word templates. | [optional] |
|
|
38
39
|
| **scss** | **String** | The SCSS of an HTML template. | [optional] |
|
|
39
40
|
| **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | [optional] |
|
|
40
41
|
| **footer_html** | **String** | The HTML printed at the bottom of each page of an HTML template. | [optional] |
|
|
41
42
|
| **html_engine_options** | [**HtmlEngineOptionsInput**](HtmlEngineOptionsInput.md) | Null resets the options to their defaults. | [optional] |
|
|
42
43
|
| **html_escape_data** | **Boolean** | Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for PDF templates. | [optional] |
|
|
43
|
-
| **cache_id** | **String** |
|
|
44
|
-
| **document_url** | **String** | An https:// link to the template's PDF (up to 100 MB),
|
|
45
|
-
| **document_base64** | **String** | The template's PDF, encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`. | [optional] |
|
|
46
|
-
| **filename** | **String** | The
|
|
44
|
+
| **cache_id** | **String** | The template's document, a PDF or a Word document (.docx or .odt): the `fields.key` of a file you uploaded with the presigned upload (GET /uploads/presign). PDF and Word templates need one of `cache_id`, `document_url` and `document_base64`. To upload the file with the request, use POST /templates/upload. | [optional] |
|
|
45
|
+
| **document_url** | **String** | An https:// link to the template's document, instead of `cache_id`: a PDF template's PDF (up to 100 MB) or a Word template's Word document (.docx or .odt, up to 50 MB). DocSpring downloads it after responding, following redirects to other https:// links: the template's `document.state` is `downloading` until then, and `converting` while an .odt is converted (sync.api hosts wait for both). If it can't be downloaded, the state is `download_failed` and `document.error_message` says why. | [optional] |
|
|
46
|
+
| **document_base64** | **String** | The template's document (a PDF, or a Word template's Word document), encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`. | [optional] |
|
|
47
|
+
| **filename** | **String** | The file's name, for a `cache_id` (presigned uploads don't send one) or `document_base64`. A `document_url`'s is the last part of its path unless you set it. | [optional] |
|
|
47
48
|
| **detect_fields** | **Boolean** | Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up. | [optional] |
|
|
48
49
|
| **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] |
|
|
49
50
|
| **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] |
|
|
@@ -58,6 +59,7 @@ instance = DocSpring::CreateTemplateRequest.new(
|
|
|
58
59
|
name: null,
|
|
59
60
|
description: null,
|
|
60
61
|
template_type: null,
|
|
62
|
+
output_format: null,
|
|
61
63
|
parent_folder_id: null,
|
|
62
64
|
locked: null,
|
|
63
65
|
add_signature_request_submission_id_footers: null,
|
data/docs/ErrorInfo.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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`. `upgrade_required` (403): your plan doesn't include this, such as more templates or the embedded template editor. `account_suspended` (403): the account is suspended, so it can't create submissions. `polling_timeout`: on a sync.api host, the
|
|
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`. `upgrade_required` (403): your plan doesn't include this, such as more templates, another active integration (webhooks count) or the embedded template editor. `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): a request with the same Idempotency-Key is still being processed. Send the request again in a few seconds; when the first request has already created its record, its ID is in `submission_id`, `submission_batch_id` or `combined_pdf_id`. `idempotency_key_reused` (422): the Idempotency-Key was already used for a different request. | |
|
|
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. | |
|
data/docs/FieldGroup.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **name** | **String** | The group's name: `address` for the field `address/city`. A list's item numbers are written as `~`, so the fields `items/0/price` and `items/1/price` are in the groups `items` and `items/~`, the list's items. | |
|
|
8
|
-
| **type** | [**FieldGroupType**](FieldGroupType.md) | `array` for a list, whose fields' names number its items after the group's name (`items/0/price`, or `items/~/price` in an HTML template), and `object` for the other groups. | |
|
|
8
|
+
| **type** | [**FieldGroupType**](FieldGroupType.md) | `array` for a list, whose fields' names number its items after the group's name (`items/0/price`, or `items/~/price` in an HTML or Word template), and `object` for the other groups. | |
|
|
9
9
|
| **title** | **String** | The group's title in the template's data schema and on forms. When it's empty, a title is made from the group's name. | |
|
|
10
10
|
| **description** | **String** | Help text for the group, added to the template's data schema and shown on forms. | |
|
|
11
11
|
| **metadata** | **String** | Text for your own use, added to the template's data schema as `x-metadata`. DocSpring doesn't use it. | |
|
|
12
12
|
| **min_items** | **Integer** | Lists only (`type` `array`): the fewest items submission data must have. Null for no minimum. | |
|
|
13
|
-
| **max_items** | **Integer** | HTML templates' lists only: the most items submission data can have. Null for no limit. A PDF template's list takes as many items as its fields are numbered for, or more with `allow_additional_items`. | |
|
|
13
|
+
| **max_items** | **Integer** | HTML and Word templates' lists only: the most items submission data can have. Null for no limit. A PDF template's list takes as many items as its fields are numbered for, or more with `allow_additional_items`. | |
|
|
14
14
|
| **allow_additional_items** | **Boolean** | PDF templates' lists only: submission data can have more items than the list's fields are numbered for. Default false. | |
|
|
15
15
|
|
|
16
16
|
## Example
|
data/docs/FieldGroupInput.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **description** | **String** | Help text for the group, added to the template's data schema and shown on forms. | [optional] |
|
|
10
10
|
| **metadata** | **String** | Text for your own use, added to the template's data schema as `x-metadata`. DocSpring doesn't use it. | [optional] |
|
|
11
11
|
| **min_items** | **Integer** | Lists only (`type` `array`): the fewest items submission data must have. Null for no minimum. | [optional] |
|
|
12
|
-
| **max_items** | **Integer** | HTML templates' lists only: the most items submission data can have. Null for no limit. A PDF template's list takes as many items as its fields are numbered for, or more with `allow_additional_items`. | [optional] |
|
|
12
|
+
| **max_items** | **Integer** | HTML and Word templates' lists only: the most items submission data can have. Null for no limit. A PDF template's list takes as many items as its fields are numbered for, or more with `allow_additional_items`. | [optional] |
|
|
13
13
|
| **allow_additional_items** | **Boolean** | PDF templates' lists only: submission data can have more items than the list's fields are numbered for. Default false. | [optional] |
|
|
14
14
|
|
|
15
15
|
## Example
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **formats** | [**Array<GenerateFilesFormat>**](GenerateFilesFormat.md) | The formats to add to the submission's files: `png`, an image of each page of the
|
|
7
|
+
| **formats** | [**Array<GenerateFilesFormat>**](GenerateFilesFormat.md) | The formats to add to the submission's files: `pdf`, the PDF of a Word template's submission that didn't make one (converted from its Word document); `docx`, the Word document of a Word template's submission that didn't make one (made again from the submission's data and the template version it used); `odt`, the OpenDocument file of a Word template's submission that didn't make one (converted from its Word document); and `png`, an image of each page of the PDF (up to 100 pages), which makes the PDF first if the submission doesn't have one. A submission without a Word document makes it again for `pdf` and `odt`, without keeping it. A format the submission already has (or is making) is left as it is. | |
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
data/docs/GeneratedFile.md
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
| **error_message** | **String** | Why the file couldn't be made, when `state` is `error`. | |
|
|
9
9
|
| **download_url** | **String** | A temporary link to download the file. Null until the file has been made, and when your account turns off download links for submissions. | |
|
|
10
10
|
| **permanent_url** | **String** | A link to download the file that doesn't expire: it redirects to a new temporary link. It needs your API token or a signed-in session, except for a submission of a template that makes its submissions public. Null until the file has been made. | |
|
|
11
|
-
| **filename** | **String** | The file's name, such as `sub_123.pdf`. | |
|
|
12
|
-
| **content_type** | **String** | The file's media type,
|
|
11
|
+
| **filename** | **String** | The file's name, such as `sub_123.pdf`, `sub_123.docx` or `sub_123.odt`. | |
|
|
12
|
+
| **content_type** | **String** | The file's media type: `application/pdf`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document` for a Word document, or `application/vnd.oasis.opendocument.text` for an OpenDocument file. | |
|
|
13
13
|
| **size** | **Integer** | The file's size in bytes. Null until the file has been made. | |
|
|
14
14
|
| **sha256** | **String** | The SHA-256 hash of the file. Null until the file has been made. | |
|
|
15
15
|
|
data/docs/Submission.md
CHANGED
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | The submission's ID. | |
|
|
8
8
|
| **template_id** | **String** | Null once the template has been permanently deleted. | |
|
|
9
|
-
| **template_type** | [**TemplateType**](TemplateType.md) | The template's type: `pdf` or `
|
|
9
|
+
| **template_type** | [**TemplateType**](TemplateType.md) | The template's type: `pdf`, `html` or `docx`. | |
|
|
10
10
|
| **template_version** | **String** | The published version of the template the submission used. Null for the draft. | |
|
|
11
11
|
| **batch_id** | **String** | The ID of the batch the submission was created in. | |
|
|
12
12
|
| **source** | [**SubmissionSource**](SubmissionSource.md) | `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again. | |
|
|
13
|
-
| **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the
|
|
13
|
+
| **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`. | |
|
|
14
14
|
| **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. | |
|
|
15
15
|
| **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`. | |
|
|
16
16
|
| **data** | **Hash<String, Object>** | The submission's data, with the values entered in completed signature requests. Empty once the submission has expired. Null in a batch's submissions unless you pass `include_data=true`, and in the events of a webhook that leaves out submission data. | |
|
|
17
17
|
| **data_errors** | [**Array<ErrorDetail>**](ErrorDetail.md) | Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired. | |
|
|
18
18
|
| **error_message** | **String** | Why the PDF couldn't be generated, when `state` is `error`. | |
|
|
19
19
|
| **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`). | |
|
|
20
|
-
| **files** | [**SubmissionFiles**](SubmissionFiles.md) | The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired. | |
|
|
20
|
+
| **files** | [**SubmissionFiles**](SubmissionFiles.md) | The generated files: `pdf`, `docx` and `odt` (by `output_formats`) once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired. | |
|
|
21
21
|
| **expired** | **Boolean** | An expired submission's data, metadata, password and PDF have been deleted. | |
|
|
22
22
|
| **expires_at** | **Time** | When the submission expires. Null if it's kept until you delete it. | |
|
|
23
23
|
| **processed_at** | **Time** | When the PDF was generated. Null until then. | |
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| **signature_requests** | [**Array<SignatureRequest>**](SignatureRequest.md) | The people asked to sign the submission (and fill in their fields), in order. | |
|
|
28
28
|
| **actions** | [**Array<SubmissionAction>**](SubmissionAction.md) | The uploads of the submission's PDF to your storage (account integrations). | |
|
|
29
29
|
| **truncated_text** | **Hash<String, Array<String>>** | The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired. | |
|
|
30
|
-
| **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission. | |
|
|
30
|
+
| **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. | |
|
|
31
31
|
| **preview_generated_at** | **Time** | When the preview PDF was generated. Null if there is no preview. | |
|
|
32
32
|
|
|
33
33
|
## Example
|
data/docs/SubmissionBatch.md
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | The batch's ID. | |
|
|
8
|
-
| **state** | [**SubmissionBatchState**](SubmissionBatchState.md) | `pending` while the
|
|
8
|
+
| **state** | [**SubmissionBatchState**](SubmissionBatchState.md) | `pending` while the files are being generated, then `processed`. `error` as soon as a submission fails, while the others can still be pending: the batch has finished once `processed_at` is set. | |
|
|
9
9
|
| **metadata** | **Hash<String, Object>** | Your own data about the batch, such as an ID from your app. | |
|
|
10
10
|
| **total_count** | **Integer** | The number of submissions in the request. | |
|
|
11
|
-
| **pending_count** | **Integer** | The submissions whose
|
|
12
|
-
| **error_count** | **Integer** | The submissions that were invalid or whose
|
|
11
|
+
| **pending_count** | **Integer** | The submissions whose files haven't been generated yet. | |
|
|
12
|
+
| **error_count** | **Integer** | The submissions that were invalid or whose files couldn't be generated. | |
|
|
13
13
|
| **completion_percentage** | **Integer** | The percentage of the batch's submissions that have finished, from 0 to 100. | |
|
|
14
14
|
| **submissions** | [**Array<Submission>**](Submission.md) | The batch's submissions, in the order of the request. Their `data` is null unless you pass `include_data=true`. A batch that failed validation only has the submissions that were recorded as `invalid_data`. | |
|
|
15
15
|
| **processed_at** | **Time** | When every submission had finished. | |
|
data/docs/SubmissionFiles.md
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
| **pdf** | [**GeneratedFile**](GeneratedFile.md) | The submission's PDF. | [optional] |
|
|
8
8
|
| **audit_trail** | [**GeneratedFile**](GeneratedFile.md) | The audit trail of a submission with signature requests: who signed, when and how. It's also added to the end of the PDF when the template's `merge_audit_trail_pdf` is on. | [optional] |
|
|
9
9
|
| **preview** | [**GeneratedFile**](GeneratedFile.md) | The preview PDF from POST /submissions/{submission_id}/generate_preview, such as for a submission still waiting for its signature requests. | [optional] |
|
|
10
|
+
| **docx** | [**GeneratedFile**](GeneratedFile.md) | The Word document of a Word template's submission, when the submission makes one (`output_formats`). | [optional] |
|
|
11
|
+
| **odt** | [**GeneratedFile**](GeneratedFile.md) | The OpenDocument file (.odt, the format LibreOffice uses) of a Word template's submission, converted from its Word document, when the submission makes one (`output_formats`). | [optional] |
|
|
10
12
|
| **png** | [**PageImages**](PageImages.md) | | [optional] |
|
|
11
13
|
|
|
12
14
|
## Example
|
|
@@ -18,6 +20,8 @@ instance = DocSpring::SubmissionFiles.new(
|
|
|
18
20
|
pdf: null,
|
|
19
21
|
audit_trail: null,
|
|
20
22
|
preview: null,
|
|
23
|
+
docx: null,
|
|
24
|
+
odt: null,
|
|
21
25
|
png: null
|
|
22
26
|
)
|
|
23
27
|
```
|
data/docs/SubmissionInput.md
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
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. | [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
|
|
9
|
+
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF and Word templates. | [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
|
-
| **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. | [optional] |
|
|
12
|
-
| **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission. | [optional] |
|
|
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
|
+
| **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. | [optional] |
|
|
14
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. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`. | [optional] |
|
|
15
15
|
| **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
|
data/docs/SubmissionSummary.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | The submission's ID. | |
|
|
8
8
|
| **template_id** | **String** | Null once the template has been permanently deleted. | |
|
|
9
|
-
| **template_type** | [**TemplateType**](TemplateType.md) | The template's type: `pdf` or `
|
|
9
|
+
| **template_type** | [**TemplateType**](TemplateType.md) | The template's type: `pdf`, `html` or `docx`. | |
|
|
10
10
|
| **template_version** | **String** | The published version of the template the submission used. Null for the draft. | |
|
|
11
11
|
| **batch_id** | **String** | The ID of the batch the submission was created in. | |
|
|
12
12
|
| **source** | [**SubmissionSource**](SubmissionSource.md) | `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again. | |
|
|
13
|
-
| **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the
|
|
13
|
+
| **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the files have been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the files are generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no files: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the files failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS, or in a Word template's tags), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`. | |
|
|
14
14
|
| **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. | |
|
|
15
15
|
| **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`. | |
|
|
16
16
|
| **data** | **Hash<String, Object>** | The submission's data, with the values entered in completed signature requests. Null unless you pass `include_data=true`. Empty once the submission has expired. | |
|
data/docs/Template.md
CHANGED
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
| **id** | **String** | The template's ID. | |
|
|
8
8
|
| **name** | **String** | The template's name. | |
|
|
9
9
|
| **description** | **String** | Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests. | |
|
|
10
|
-
| **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created. | |
|
|
11
|
-
| **
|
|
12
|
-
| **
|
|
10
|
+
| **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created. | |
|
|
11
|
+
| **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | |
|
|
12
|
+
| **ready** | **Boolean** | Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded). | |
|
|
13
|
+
| **document** | [**TemplateDocument**](TemplateDocument.md) | The PDF of a PDF template, or the Word document of a Word template. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url` has one, with no file, while it's downloaded. | |
|
|
13
14
|
| **parent_folder_id** | **String** | The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions. | |
|
|
14
15
|
| **path** | **String** | The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root. | |
|
|
15
16
|
| **latest_version** | **String** | The template's latest published version. Null if no version has been published. | |
|
|
@@ -23,19 +24,19 @@
|
|
|
23
24
|
| **ai_field_naming_language** | [**AiFieldNamingLanguage**](AiFieldNamingLanguage.md) | The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates. | |
|
|
24
25
|
| **allow_additional_properties** | **Boolean** | Accept submission data with properties that aren't fields of the template. | |
|
|
25
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. | |
|
|
26
|
-
| **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).
|
|
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`. | |
|
|
27
28
|
| **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | |
|
|
28
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). 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 the simple form) aren't restricted. | |
|
|
29
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). | |
|
|
30
31
|
| **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | |
|
|
31
32
|
| **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | |
|
|
32
|
-
| **encrypt_pdfs** | **Boolean** | Encrypt generated PDFs with `encrypt_pdfs_password`. | |
|
|
33
|
+
| **encrypt_pdfs** | **Boolean** | Encrypt generated PDFs with `encrypt_pdfs_password`. A Word template can only encrypt its PDFs when its `output_format` is `pdf`, because Word documents and OpenDocument files can't be password-protected. | |
|
|
33
34
|
| **has_encrypt_pdfs_password** | **Boolean** | Whether `encrypt_pdfs_password` is set. | |
|
|
34
35
|
| **expire_submissions** | **Boolean** | Delete each submission's data and PDF after `expire_after` `expiration_interval`. | |
|
|
35
36
|
| **expire_after** | **Integer** | How many `expiration_interval`s a submission's data and PDF are kept for, when `expire_submissions` is on. At most 5256000 (10 years in minutes). | |
|
|
36
37
|
| **expiration_interval** | [**ExpirationInterval**](ExpirationInterval.md) | The unit of `expire_after`. | |
|
|
37
38
|
| **merge_audit_trail_pdf** | **Boolean** | Add the audit trail to the end of PDFs signed through signature requests. | |
|
|
38
|
-
| **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 template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. | |
|
|
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. | |
|
|
39
40
|
| **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | |
|
|
40
41
|
| **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | |
|
|
41
42
|
| **redirect_url** | **String** | Where the web form sends people after they submit it. | |
|
|
@@ -46,11 +47,11 @@
|
|
|
46
47
|
| **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/~`. | |
|
|
47
48
|
| **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. | |
|
|
48
49
|
| **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. | |
|
|
49
|
-
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF templates. | |
|
|
50
|
+
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF and Word templates. | |
|
|
50
51
|
| **scss** | **String** | The SCSS of an HTML template. | |
|
|
51
52
|
| **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | |
|
|
52
53
|
| **footer_html** | **String** | The HTML printed at the bottom of each page of an HTML template. | |
|
|
53
|
-
| **html_engine_options** | [**HtmlEngineOptions**](HtmlEngineOptions.md) | How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults. | |
|
|
54
|
+
| **html_engine_options** | [**HtmlEngineOptions**](HtmlEngineOptions.md) | How an HTML template's PDFs are printed. Null for PDF and Word templates. Setting it replaces the whole object: options left out use their defaults. | |
|
|
54
55
|
| **html_escape_data** | **Boolean** | Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for PDF templates. | |
|
|
55
56
|
| **embed_edit_token** | **String** | The token that opens the template in the embedded template editor. | |
|
|
56
57
|
| **versions** | [**Array<TemplateVersion>**](TemplateVersion.md) | The template's published versions, newest first (up to 100). | |
|
|
@@ -65,6 +66,7 @@ instance = DocSpring::Template.new(
|
|
|
65
66
|
name: null,
|
|
66
67
|
description: null,
|
|
67
68
|
template_type: null,
|
|
69
|
+
output_format: null,
|
|
68
70
|
ready: null,
|
|
69
71
|
document: null,
|
|
70
72
|
parent_folder_id: null,
|
data/docs/TemplateDiff.md
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
| **to_version** | **String** | The later version, such as `1.2.0`. Null for the draft. | |
|
|
10
10
|
| **summary** | [**TemplateDiffSummary**](TemplateDiffSummary.md) | How many changes of each kind there are. | |
|
|
11
11
|
| **fields** | [**TemplateFieldChanges**](TemplateFieldChanges.md) | The fields that changed. | |
|
|
12
|
-
| **changed_settings** | **Array<String>** | The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `
|
|
13
|
-
| **document_changed** | **Boolean** | The template's PDF was replaced (or added, when there's no `from_version`). | |
|
|
12
|
+
| **changed_settings** | **Array<String>** | The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `merge_audit_trail_pdf`, ...). Values aren't included. Settings that apply to every version, such as `webhook_url` and `encrypt_pdfs_password`, are the same on every version, so they're named only when there's no earlier version to compare with; a secret is named without its value. | |
|
|
13
|
+
| **document_changed** | **Boolean** | The template's PDF was replaced, or its Word document replaced or edited (or added, when there's no `from_version`). | |
|
|
14
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
data/docs/TemplateDocument.md
CHANGED
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **filename** | **String** | The
|
|
8
|
-
| **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed` (`ready` says when its pages are done too). `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. `downloading` while DocSpring downloads a `document_url`, then as for an upload. `download_failed` means it couldn't be downloaded, and `error_message` says why. A template keeps its
|
|
9
|
-
| **error_message** | **String** | Why the PDF couldn't be processed or downloaded, and how to fix it. Null unless `state` is an error. | |
|
|
10
|
-
| **page_count** | **Integer** | 0 until the PDF has been processed. | |
|
|
11
|
-
| **md5** | **String** | The MD5 hash of the PDF. | |
|
|
7
|
+
| **filename** | **String** | The file's name. Null until a `document_url` has been downloaded or an OpenDocument file converted. | |
|
|
8
|
+
| **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed` (`ready` says when its pages are done too). `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. `downloading` while DocSpring downloads a `document_url`, then as for an upload. `download_failed` means it couldn't be downloaded, and `error_message` says why. `converting` while DocSpring converts an OpenDocument file (.odt) uploaded to a Word template to a Word document, and `conversion_failed` when it couldn't, with `error_message` saying why. A template keeps its document while a new one is downloaded or converted, and when it couldn't be. A Word document is `processed` once it's uploaded, downloaded or converted. | |
|
|
9
|
+
| **error_message** | **String** | Why the PDF couldn't be processed, or the document downloaded or converted, and how to fix it. Null unless `state` is an error. | |
|
|
10
|
+
| **page_count** | **Integer** | 0 until the PDF has been processed. 0 for a Word document, whose pages depend on the data. | |
|
|
11
|
+
| **md5** | **String** | The MD5 hash of the PDF. Null for a Word document. | |
|
|
12
12
|
| **field_reimport_state** | [**FieldReimportState**](FieldReimportState.md) | Whether the fields are being re-imported from this PDF (`reimport_fields` when the PDF was replaced): `requested` while DocSpring processes the PDF, then `imported`, or `no_fields` when the PDF had no fillable fields and the template kept its fields. `none` when no re-import was asked for, or when it couldn't run (the PDF couldn't be processed, or the template was locked or published while it was). | |
|
|
13
13
|
| **page_dimensions** | **Array<Array<Float>>** | Each page's width and height in PDF points. Null until the PDF has been processed. | |
|
|
14
|
-
| **has_fillable_fields** | **Boolean** | Whether the PDF has fillable form fields. Null until DocSpring has read the PDF. | |
|
|
15
|
-
| **page_processing_statuses** | [**Array<TemplatePageProcessingStatus>**](TemplatePageProcessingStatus.md) | How processing is going on each page, in page order: its image, and its fields when DocSpring sets them up (`detect_fields` when the template was created). `state` becomes `processed` once every page is done. Empty until DocSpring has read the PDF,
|
|
16
|
-
| **field_logic_status** | [**TemplateFieldLogicStatus**](TemplateFieldLogicStatus.md) | AI field setup's last step, which reads the whole form once every page is done and can still rename fields and add conditional logic and required fields: `pending` or `processing` until it finishes, then `processed`, `failed` or `skipped`. Null until every page is done, and when there's no logic step to run (`field_logic` is `none`, or the PDF has no fields). | |
|
|
17
|
-
| **download_url** | **String** | A temporary link to download the PDF. | |
|
|
18
|
-
| **permanent_url** | **String** | A link to download the
|
|
14
|
+
| **has_fillable_fields** | **Boolean** | Whether the PDF has fillable form fields. Null until DocSpring has read the PDF, and for a Word document. | |
|
|
15
|
+
| **page_processing_statuses** | [**Array<TemplatePageProcessingStatus>**](TemplatePageProcessingStatus.md) | How processing is going on each page, in page order: its image, and its fields when DocSpring sets them up (`detect_fields` when the template was created). `state` becomes `processed` once every page is done. Empty until DocSpring has read the PDF, for PDFs uploaded before DocSpring recorded page statuses, and for a Word document. | |
|
|
16
|
+
| **field_logic_status** | [**TemplateFieldLogicStatus**](TemplateFieldLogicStatus.md) | AI field setup's last step, which reads the whole form once every page is done and can still rename fields and add conditional logic and required fields: `pending` or `processing` until it finishes, then `processed`, `failed` or `skipped`. Null until every page is done, and when there's no logic step to run (`field_logic` is `none`, or the PDF has no fields). Null for a Word document. | |
|
|
17
|
+
| **download_url** | **String** | A temporary link to download the PDF. Null for a Word document (use `permanent_url`). | |
|
|
18
|
+
| **permanent_url** | **String** | A link to download the file that doesn't expire. Null until a PDF has been processed. A Word document's is built from the template's current document when it's downloaded. | |
|
|
19
19
|
|
|
20
20
|
## Example
|
|
21
21
|
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **filename** | **String** | The
|
|
8
|
-
| **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed` (`ready` says when its pages are done too). `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. `downloading` while DocSpring downloads a `document_url`, then as for an upload. `download_failed` means it couldn't be downloaded, and `error_message` says why. A template keeps its
|
|
9
|
-
| **error_message** | **String** | Why the PDF couldn't be processed or downloaded, and how to fix it. Null unless `state` is an error. | |
|
|
10
|
-
| **page_count** | **Integer** | 0 until the PDF has been processed. | |
|
|
7
|
+
| **filename** | **String** | The file's name. Null until a `document_url` has been downloaded or an OpenDocument file converted. | |
|
|
8
|
+
| **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed` (`ready` says when its pages are done too). `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. `downloading` while DocSpring downloads a `document_url`, then as for an upload. `download_failed` means it couldn't be downloaded, and `error_message` says why. `converting` while DocSpring converts an OpenDocument file (.odt) uploaded to a Word template to a Word document, and `conversion_failed` when it couldn't, with `error_message` saying why. A template keeps its document while a new one is downloaded or converted, and when it couldn't be. A Word document is `processed` once it's uploaded, downloaded or converted. | |
|
|
9
|
+
| **error_message** | **String** | Why the PDF couldn't be processed, or the document downloaded or converted, and how to fix it. Null unless `state` is an error. | |
|
|
10
|
+
| **page_count** | **Integer** | 0 until the PDF has been processed. 0 for a Word document, whose pages depend on the data. | |
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
data/docs/TemplatePreview.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| **template_id** | **String** | The template's ID. | |
|
|
9
9
|
| **version** | **String** | The published version that was rendered, such as `1.2.0`. Null for the draft. | |
|
|
10
10
|
| **state** | [**TemplatePreviewState**](TemplatePreviewState.md) | `pending` while it renders (usually a few seconds), then `processed`, or `error` with an `error_message`. | |
|
|
11
|
-
| **error_message** | **String** | Why the preview couldn't be rendered, such as an error in an HTML template's Liquid, or a value in the data that a field can't print. | |
|
|
11
|
+
| **error_message** | **String** | Why the preview couldn't be rendered, such as an error in an HTML or Word template's Liquid, or a value in the data that a field can't print. | |
|
|
12
12
|
| **page_count** | **Integer** | How many pages the template printed, once it's processed. | |
|
|
13
13
|
| **pages** | [**Array<PageImage>**](PageImage.md) | A PNG image of each page once it's processed, in order: `pages[0]` is page 1. A preview has no PDF. Their `download_url`s expire, so get the preview again when you need them. | |
|
|
14
14
|
| **expires_at** | **Time** | When the preview and its images are deleted. | |
|
data/docs/TemplateSummary.md
CHANGED
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
| **id** | **String** | The template's ID. | |
|
|
8
8
|
| **name** | **String** | The template's name. | |
|
|
9
9
|
| **description** | **String** | Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests. | |
|
|
10
|
-
| **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created. | |
|
|
11
|
-
| **
|
|
12
|
-
| **
|
|
10
|
+
| **template_type** | [**TemplateType**](TemplateType.md) | `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created. | |
|
|
11
|
+
| **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | |
|
|
12
|
+
| **ready** | **Boolean** | Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded). | |
|
|
13
|
+
| **document** | [**TemplateDocumentSummary**](TemplateDocumentSummary.md) | The PDF of a PDF template, or the Word document of a Word template: its file name, page count and processing state. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url`, or a Word template created from an OpenDocument file (.odt), has one, with no file, while it's downloaded or converted. | |
|
|
13
14
|
| **parent_folder_id** | **String** | The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions. | |
|
|
14
15
|
| **path** | **String** | The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root. | |
|
|
15
16
|
| **latest_version** | **String** | The template's latest published version. Null if no version has been published. | |
|
|
@@ -29,6 +30,7 @@ instance = DocSpring::TemplateSummary.new(
|
|
|
29
30
|
name: null,
|
|
30
31
|
description: null,
|
|
31
32
|
template_type: null,
|
|
33
|
+
output_format: null,
|
|
32
34
|
ready: null,
|
|
33
35
|
document: null,
|
|
34
36
|
parent_folder_id: null,
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **cache_id** | **String** | The `fields.key` of the new PDF, uploaded with the presigned upload (GET /uploads/presign). | [optional] |
|
|
8
|
-
| **document_url** | **String** | An https:// link to the template's PDF (up to 100 MB),
|
|
9
|
-
| **document_base64** | **String** | The template's PDF, encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`. | [optional] |
|
|
10
|
-
| **filename** | **String** | The
|
|
11
|
-
| **reimport_fields** | **Boolean** | Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. | [optional] |
|
|
7
|
+
| **cache_id** | **String** | The `fields.key` of the new PDF or Word document (.docx or .odt), uploaded with the presigned upload (GET /uploads/presign). | [optional] |
|
|
8
|
+
| **document_url** | **String** | An https:// link to the template's document, instead of `cache_id`: a PDF template's PDF (up to 100 MB) or a Word template's Word document (.docx or .odt, up to 50 MB). DocSpring downloads it after responding, following redirects to other https:// links: the template's `document.state` is `downloading` until then, and `converting` while an .odt is converted (sync.api hosts wait for both). If it can't be downloaded, the state is `download_failed` and `document.error_message` says why. | [optional] |
|
|
9
|
+
| **document_base64** | **String** | The template's document (a PDF, or a Word template's Word document), encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`. | [optional] |
|
|
10
|
+
| **filename** | **String** | The file's name, for a `cache_id` (presigned uploads don't send one) or `document_base64`. A `document_url`'s is the last part of its path unless you set it. | [optional] |
|
|
11
|
+
| **reimport_fields** | **Boolean** | Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. Only for PDF templates: a Word template adds a field for each new tag. | [optional] |
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
@@ -6,25 +6,26 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **name** | **String** | The template's name. | [optional] |
|
|
8
8
|
| **description** | **String** | Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests. | [optional] |
|
|
9
|
+
| **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. | [optional] |
|
|
9
10
|
| **parent_folder_id** | **String** | The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions. | [optional] |
|
|
10
11
|
| **locked** | **Boolean** | A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed). | [optional] |
|
|
11
12
|
| **add_signature_request_submission_id_footers** | **Boolean** | Print the submission ID in the footer of each page of PDFs signed through signature requests. | [optional] |
|
|
12
13
|
| **ai_field_naming_language** | [**AiFieldNamingLanguage**](AiFieldNamingLanguage.md) | The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates. | [optional] |
|
|
13
14
|
| **allow_additional_properties** | **Boolean** | Accept submission data with properties that aren't fields of the template. | [optional] |
|
|
14
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] |
|
|
15
|
-
| **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).
|
|
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] |
|
|
16
17
|
| **editable_submissions** | **Boolean** | Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it. | [optional] |
|
|
17
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). 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 the simple form) aren't restricted. | [optional] |
|
|
18
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] |
|
|
19
20
|
| **embed_edit_allow_versioning** | **Boolean** | Allow the embedded template editor to publish, restore, compare and delete published versions. | [optional] |
|
|
20
21
|
| **embed_edit_allow_document_replacement** | **Boolean** | Allow the embedded template editor to replace the template's PDF. | [optional] |
|
|
21
|
-
| **encrypt_pdfs** | **Boolean** | Encrypt generated PDFs with `encrypt_pdfs_password`. | [optional] |
|
|
22
|
+
| **encrypt_pdfs** | **Boolean** | Encrypt generated PDFs with `encrypt_pdfs_password`. A Word template can only encrypt its PDFs when its `output_format` is `pdf`, because Word documents and OpenDocument files can't be password-protected. | [optional] |
|
|
22
23
|
| **encrypt_pdfs_password** | **String** | The password that opens encrypted PDFs. It's never returned; `has_encrypt_pdfs_password` says if it's set. | [optional] |
|
|
23
24
|
| **expire_submissions** | **Boolean** | Delete each submission's data and PDF after `expire_after` `expiration_interval`. | [optional] |
|
|
24
25
|
| **expire_after** | **Integer** | How many `expiration_interval`s a submission's data and PDF are kept for, when `expire_submissions` is on. At most 5256000 (10 years in minutes). | [optional] |
|
|
25
26
|
| **expiration_interval** | [**ExpirationInterval**](ExpirationInterval.md) | The unit of `expire_after`. | [optional] |
|
|
26
27
|
| **merge_audit_trail_pdf** | **Boolean** | Add the audit trail to the end of PDFs signed through signature requests. | [optional] |
|
|
27
|
-
| **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 template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. | [optional] |
|
|
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] |
|
|
28
29
|
| **public_submissions** | **Boolean** | Allow anyone with a submission's ID to download its PDF. | [optional] |
|
|
29
30
|
| **public_web_form** | **Boolean** | Allow anyone to fill in the template's web form. | [optional] |
|
|
30
31
|
| **redirect_url** | **String** | Where the web form sends people after they submit it. | [optional] |
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
| **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] |
|
|
35
36
|
| **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] |
|
|
36
37
|
| **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] |
|
|
37
|
-
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF templates. | [optional] |
|
|
38
|
+
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF and Word templates. | [optional] |
|
|
38
39
|
| **scss** | **String** | The SCSS of an HTML template. | [optional] |
|
|
39
40
|
| **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | [optional] |
|
|
40
41
|
| **footer_html** | **String** | The HTML printed at the bottom of each page of an HTML template. | [optional] |
|
|
@@ -49,6 +50,7 @@ require 'docspring'
|
|
|
49
50
|
instance = DocSpring::UpdateTemplateRequest.new(
|
|
50
51
|
name: null,
|
|
51
52
|
description: null,
|
|
53
|
+
output_format: null,
|
|
52
54
|
parent_folder_id: null,
|
|
53
55
|
locked: null,
|
|
54
56
|
add_signature_request_submission_id_footers: null,
|
|
@@ -6,10 +6,10 @@
|
|
|
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. | [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
|
|
9
|
+
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for PDF and Word templates, unless `signature_requests` collects them (PDF templates only). | [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
|
-
| **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. | [optional] |
|
|
12
|
-
| **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission. | [optional] |
|
|
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
|
+
| **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. | [optional] |
|
|
14
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. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`. | [optional] |
|
|
15
15
|
| **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
|