# DocSpring::PDFApi All URIs are relative to *https://api.docspring.com/api/v1* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**add_fields_to_template**](PDFApi.md#add_fields_to_template) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template | | [**batch_generate_pdf_v1**](PDFApi.md#batch_generate_pdf_v1) | **POST** /templates/{template_id}/submissions/batch | Generates multiple PDFs | | [**batch_generate_pdfs**](PDFApi.md#batch_generate_pdfs) | **POST** /submissions/batches | Generates multiple PDFs | | [**combine_pdfs**](PDFApi.md#combine_pdfs) | **POST** /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files | | [**combine_submissions**](PDFApi.md#combine_submissions) | **POST** /combined_submissions | Merge generated PDFs together | | [**copy_template**](PDFApi.md#copy_template) | **POST** /templates/{template_id}/copy | Copy a Template | | [**create_custom_file_from_upload**](PDFApi.md#create_custom_file_from_upload) | **POST** /custom_files | Create a new custom file from a cached presign upload | | [**create_data_request_event**](PDFApi.md#create_data_request_event) | **POST** /data_requests/{data_request_id}/events | Creates a new event for emailing a signee a request for signature | | [**create_data_request_token**](PDFApi.md#create_data_request_token) | **POST** /data_requests/{data_request_id}/tokens | Creates a new data request token for form authentication | | [**create_folder**](PDFApi.md#create_folder) | **POST** /folders/ | Create a folder | | [**create_html_template**](PDFApi.md#create_html_template) | **POST** /templates?desc=html | Create a new HTML template | | [**create_pdf_template**](PDFApi.md#create_pdf_template) | **POST** /templates | Create a new PDF template with a form POST file upload | | [**create_pdf_template_from_upload**](PDFApi.md#create_pdf_template_from_upload) | **POST** /templates?desc=cached_upload | Create a new PDF template from a cached presign upload | | [**delete_folder**](PDFApi.md#delete_folder) | **DELETE** /folders/{folder_id} | Delete a folder | | [**delete_template**](PDFApi.md#delete_template) | **DELETE** /templates/{template_id} | Delete a template | | [**expire_combined_submission**](PDFApi.md#expire_combined_submission) | **DELETE** /combined_submissions/{combined_submission_id} | Expire a combined submission | | [**expire_submission**](PDFApi.md#expire_submission) | **DELETE** /submissions/{submission_id} | Expire a PDF submission | | [**generate_pdf**](PDFApi.md#generate_pdf) | **POST** /templates/{template_id}/submissions | Generates a new PDF | | [**generate_preview**](PDFApi.md#generate_preview) | **POST** /submissions/{submission_id}/generate_preview | Generated a preview PDF for partially completed data requests | | [**get_combined_submission**](PDFApi.md#get_combined_submission) | **GET** /combined_submissions/{combined_submission_id} | Check the status of a combined submission (merged PDFs) | | [**get_data_request**](PDFApi.md#get_data_request) | **GET** /data_requests/{data_request_id} | Look up a submission data request | | [**get_full_template**](PDFApi.md#get_full_template) | **GET** /templates/{template_id}?full=true | Fetch the full template attributes | | [**get_presign_url**](PDFApi.md#get_presign_url) | **GET** /uploads/presign | Get a presigned URL so that you can upload a file to our AWS S3 bucket | | [**get_submission**](PDFApi.md#get_submission) | **GET** /submissions/{submission_id} | Check the status of a PDF | | [**get_submission_batch**](PDFApi.md#get_submission_batch) | **GET** /submissions/batches/{submission_batch_id} | Check the status of a submission batch job | | [**get_template**](PDFApi.md#get_template) | **GET** /templates/{template_id} | Check the status of an uploaded template | | [**get_template_schema**](PDFApi.md#get_template_schema) | **GET** /templates/{template_id}/schema | Fetch the JSON schema for a template | | [**list_combined_submissions**](PDFApi.md#list_combined_submissions) | **GET** /combined_submissions | Get a list of all combined submissions | | [**list_folders**](PDFApi.md#list_folders) | **GET** /folders/ | Get a list of all folders | | [**list_submissions**](PDFApi.md#list_submissions) | **GET** /submissions | List all submissions | | [**list_template_submissions**](PDFApi.md#list_template_submissions) | **GET** /templates/{template_id}/submissions | List all submissions for a given template | | [**list_templates**](PDFApi.md#list_templates) | **GET** /templates | Get a list of all templates | | [**move_folder_to_folder**](PDFApi.md#move_folder_to_folder) | **POST** /folders/{folder_id}/move | Move a folder | | [**move_template_to_folder**](PDFApi.md#move_template_to_folder) | **POST** /templates/{template_id}/move | Move Template to folder | | [**publish_template_version**](PDFApi.md#publish_template_version) | **POST** /templates/{template_id}/publish_version | Publish a template version | | [**rename_folder**](PDFApi.md#rename_folder) | **POST** /folders/{folder_id}/rename | Rename a folder | | [**restore_template_version**](PDFApi.md#restore_template_version) | **POST** /templates/{template_id}/restore_version | Restore a template version | | [**test_authentication**](PDFApi.md#test_authentication) | **GET** /authentication | Test Authentication | | [**update_data_request**](PDFApi.md#update_data_request) | **PUT** /data_requests/{data_request_id} | Update a submission data request | | [**update_template**](PDFApi.md#update_template) | **PUT** /templates/{template_id} | Update a Template | ## add_fields_to_template > add_fields_to_template(template_id, data) Add new fields to a Template ### Examples ```ruby require 'time' require 'docspring' # setup authorization DocSpring.configure do |config| # Configure HTTP basic authorization: api_token_basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = DocSpring::PDFApi.new template_id = 'tpl_000000000000000002' # String | data = DocSpring::AddFieldsData.new({fields: [3.56]}) # AddFieldsData | begin # Add new fields to a Template result = api_instance.add_fields_to_template(template_id, data) p result rescue DocSpring::ApiError => e puts "Error when calling PDFApi->add_fields_to_template: #{e}" end ``` #### Using the add_fields_to_template_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> add_fields_to_template_with_http_info(template_id, data) ```ruby begin # Add new fields to a Template data, status_code, headers = api_instance.add_fields_to_template_with_http_info(template_id, data) p status_code # => 2xx p headers # => { ... } p data # => rescue DocSpring::ApiError => e puts "Error when calling PDFApi->add_fields_to_template_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **template_id** | **String** | | | | **data** | [**AddFieldsData**](AddFieldsData.md) | | | ### Return type [**AddFieldsTemplateResponse**](AddFieldsTemplateResponse.md) ### Authorization [api_token_basic](../README.md#api_token_basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## batch_generate_pdf_v1 > > batch_generate_pdf_v1(template_id, data) Generates multiple PDFs ### Examples ```ruby require 'time' require 'docspring' # setup authorization DocSpring.configure do |config| # Configure HTTP basic authorization: api_token_basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = DocSpring::PDFApi.new template_id = 'tpl_000000000000000001' # String | data = [DocSpring::SubmissionData.new({data: 3.56})] # Array | begin # Generates multiple PDFs result = api_instance.batch_generate_pdf_v1(template_id, data) p result rescue DocSpring::ApiError => e puts "Error when calling PDFApi->batch_generate_pdf_v1: #{e}" end ``` #### Using the batch_generate_pdf_v1_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> batch_generate_pdf_v1_with_http_info(template_id, data) ```ruby begin # Generates multiple PDFs data, status_code, headers = api_instance.batch_generate_pdf_v1_with_http_info(template_id, data) p status_code # => 2xx p headers # => { ... } p data # => > rescue DocSpring::ApiError => e puts "Error when calling PDFApi->batch_generate_pdf_v1_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **template_id** | **String** | | | | **data** | [**Array<SubmissionData>**](SubmissionData.md) | | | ### Return type [**Array<CreateSubmissionResponse>**](CreateSubmissionResponse.md) ### Authorization [api_token_basic](../README.md#api_token_basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## batch_generate_pdfs > batch_generate_pdfs(data) Generates multiple PDFs ### Examples ```ruby require 'time' require 'docspring' # setup authorization DocSpring.configure do |config| # Configure HTTP basic authorization: api_token_basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = DocSpring::PDFApi.new data = DocSpring::SubmissionBatchData.new({submissions: [DocSpring::SubmissionDataBatchRequest.new({data: 3.56, template_id: 'template_id_example'})]}) # SubmissionBatchData | begin # Generates multiple PDFs result = api_instance.batch_generate_pdfs(data) p result rescue DocSpring::ApiError => e puts "Error when calling PDFApi->batch_generate_pdfs: #{e}" end ``` #### Using the batch_generate_pdfs_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> batch_generate_pdfs_with_http_info(data) ```ruby begin # Generates multiple PDFs data, status_code, headers = api_instance.batch_generate_pdfs_with_http_info(data) p status_code # => 2xx p headers # => { ... } p data # => rescue DocSpring::ApiError => e puts "Error when calling PDFApi->batch_generate_pdfs_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **data** | [**SubmissionBatchData**](SubmissionBatchData.md) | | | ### Return type [**CreateSubmissionBatchResponse**](CreateSubmissionBatchResponse.md) ### Authorization [api_token_basic](../README.md#api_token_basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## combine_pdfs > combine_pdfs(data) Merge submission PDFs, template PDFs, or custom files ### Examples ```ruby require 'time' require 'docspring' # setup authorization DocSpring.configure do |config| # Configure HTTP basic authorization: api_token_basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = DocSpring::PDFApi.new data = DocSpring::CombinePdfsData.new({source_pdfs: [3.56]}) # CombinePdfsData | begin # Merge submission PDFs, template PDFs, or custom files result = api_instance.combine_pdfs(data) p result rescue DocSpring::ApiError => e puts "Error when calling PDFApi->combine_pdfs: #{e}" end ``` #### Using the combine_pdfs_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> combine_pdfs_with_http_info(data) ```ruby begin # Merge submission PDFs, template PDFs, or custom files data, status_code, headers = api_instance.combine_pdfs_with_http_info(data) p status_code # => 2xx p headers # => { ... } p data # => rescue DocSpring::ApiError => e puts "Error when calling PDFApi->combine_pdfs_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **data** | [**CombinePdfsData**](CombinePdfsData.md) | | | ### Return type [**CreateCombinedSubmissionResponse**](CreateCombinedSubmissionResponse.md) ### Authorization [api_token_basic](../README.md#api_token_basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## combine_submissions > combine_submissions(data) Merge generated PDFs together ### Examples ```ruby require 'time' require 'docspring' # setup authorization DocSpring.configure do |config| # Configure HTTP basic authorization: api_token_basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = DocSpring::PDFApi.new data = DocSpring::CombinedSubmissionData.new({submission_ids: ['submission_ids_example']}) # CombinedSubmissionData | begin # Merge generated PDFs together result = api_instance.combine_submissions(data) p result rescue DocSpring::ApiError => e puts "Error when calling PDFApi->combine_submissions: #{e}" end ``` #### Using the combine_submissions_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> combine_submissions_with_http_info(data) ```ruby begin # Merge generated PDFs together data, status_code, headers = api_instance.combine_submissions_with_http_info(data) p status_code # => 2xx p headers # => { ... } p data # => rescue DocSpring::ApiError => e puts "Error when calling PDFApi->combine_submissions_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **data** | [**CombinedSubmissionData**](CombinedSubmissionData.md) | | | ### Return type [**CreateCombinedSubmissionResponse**](CreateCombinedSubmissionResponse.md) ### Authorization [api_token_basic](../README.md#api_token_basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## copy_template >