View Source Docspring.Api.PDF (docspring v0.0.4)

API calls for all endpoints tagged PDF.

Link to this section Summary

Functions

Merge submission PDFs, template PDFs, or custom files

Merge generated PDFs together

Create a new custom file from a cached presign upload

Creates a new data request token for form authentication

Create a new PDF template from a cached presign upload

Check the status of a combined submission (merged PDFs)

Fetch the full template attributes

Get a presigned URL so that you can upload a file to our AWS S3 bucket

Check the status of a submission batch job

Check the status of an uploaded template

Fetch the JSON schema for a template

Get a list of all folders

List all submissions for a given template

Get a list of all templates

Link to this section Functions

Link to this function

add_fields_to_template(connection, template_id, opts \\ [])

View Source
@spec add_fields_to_template(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.AddFieldsTemplateResponse.t()} | {:error, Tesla.Env.t()}

Add new fields to a Template

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :add_fields_data (AddFieldsData):

returns

Returns

} on success {:error, info} on failure

Link to this function

batch_generate_pdf_v1(connection, template_id, object, opts \\ [])

View Source
@spec batch_generate_pdf_v1(
  Tesla.Env.client(),
  String.t(),
  [Docspring.Model.Object.t()],
  keyword()
) ::
  {:ok, [Docspring.Model.CreateSubmissionResponse.t()]}
  | {:error, Tesla.Env.t()}

Generates multiple PDFs

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • object ([Object]):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

, ...]} on success {:error, info} on failure

Link to this function

batch_generate_pdfs(connection, opts \\ [])

View Source
@spec batch_generate_pdfs(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Docspring.Model.CreateSubmissionBatchResponse.t()}
  | {:error, Tesla.Env.t()}

Generates multiple PDFs

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :submission_batch_data (SubmissionBatchData):

returns

Returns

} on success {:error, info} on failure

Link to this function

combine_pdfs(connection, opts \\ [])

View Source
@spec combine_pdfs(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Docspring.Model.CreateCombinedSubmissionResponse.t()}
  | {:error, Tesla.Env.t()}

Merge submission PDFs, template PDFs, or custom files

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :combine_pdfs_data (CombinePdfsData):

returns

Returns

} on success {:error, info} on failure

Link to this function

combine_submissions(connection, opts \\ [])

View Source
@spec combine_submissions(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Docspring.Model.CreateCombinedSubmissionResponse.t()}
  | {:error, Tesla.Env.t()}

Merge generated PDFs together

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :combined_submission_data (CombinedSubmissionData):

returns

Returns

} on success {:error, info} on failure

Link to this function

copy_template(connection, template_id, opts \\ [])

View Source
@spec copy_template(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.Template.t()} | {:error, Tesla.Env.t()}

Copy a Template

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :copy_template_data (CopyTemplateData):

returns

Returns

} on success {:error, info} on failure

Link to this function

create_custom_file_from_upload(connection, opts \\ [])

View Source
@spec create_custom_file_from_upload(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Docspring.Model.CreateCustomFileResponse.t()} | {:error, Tesla.Env.t()}

Create a new custom file from a cached presign upload

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :create_custom_file_data (CreateCustomFileData):

returns

Returns

} on success {:error, info} on failure

Link to this function

create_data_request_token(connection, data_request_id, opts \\ [])

View Source
@spec create_data_request_token(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.CreateSubmissionDataRequestTokenResponse.t()}
  | {:error, Tesla.Env.t()}

Creates a new data request token for form authentication

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • data_request_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

create_folder(connection, opts \\ [])

View Source
@spec create_folder(
  Tesla.Env.client(),
  keyword()
) :: {:ok, Docspring.Model.Folder.t()} | {:error, Tesla.Env.t()}

Create a folder

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :create_folder_data (CreateFolderData):

returns

Returns

} on success {:error, info} on failure

Link to this function

create_html_template(connection, opts \\ [])

View Source
@spec create_html_template(
  Tesla.Env.client(),
  keyword()
) :: {:ok, Docspring.Model.PendingTemplate.t()} | {:error, Tesla.Env.t()}

Create a new HTML template

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :create_html_template_data (CreateHtmlTemplateData):

returns

Returns

} on success {:error, info} on failure

Link to this function

create_pdf_template(connection, template_left_square_bracketdocument_right_square_bracket, template_left_square_bracketname_right_square_bracket, opts \\ [])

View Source
@spec create_pdf_template(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, Docspring.Model.PendingTemplate.t()} | {:error, Tesla.Env.t()}

Create a new PDF template with a form POST file upload

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_left_square_bracketdocument_right_square_bracket (String.t):
  • template_left_square_bracketname_right_square_bracket (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :template_left_square_bracketparent_folder_id_right_square_bracket (String.t):

returns

Returns

} on success {:error, info} on failure

Link to this function

create_pdf_template_from_upload(connection, opts \\ [])

View Source
@spec create_pdf_template_from_upload(
  Tesla.Env.client(),
  keyword()
) :: {:ok, Docspring.Model.PendingTemplate.t()} | {:error, Tesla.Env.t()}

Create a new PDF template from a cached presign upload

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :create_template_from_upload_data (CreateTemplateFromUploadData):

returns

Returns

} on success {:error, info} on failure

Link to this function

delete_folder(connection, folder_id, opts \\ [])

View Source
@spec delete_folder(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.Folder.t()} | {:error, Tesla.Env.t()}

Delete a folder

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • folder_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

expire_combined_submission(connection, combined_submission_id, opts \\ [])

View Source
@spec expire_combined_submission(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.CombinedSubmission.t()} | {:error, Tesla.Env.t()}

Expire a combined submission

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • combined_submission_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

expire_submission(connection, submission_id, opts \\ [])

View Source
@spec expire_submission(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.Submission.t()} | {:error, Tesla.Env.t()}

Expire a PDF submission

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • submission_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

generate_pdf(connection, template_id, opts \\ [])

View Source
@spec generate_pdf(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.CreateSubmissionResponse.t()} | {:error, Tesla.Env.t()}

Generates a new PDF

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :submission_data (SubmissionData):

returns

Returns

} on success {:error, info} on failure

Link to this function

get_combined_submission(connection, combined_submission_id, opts \\ [])

View Source
@spec get_combined_submission(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.CombinedSubmission.t()} | {:error, Tesla.Env.t()}

Check the status of a combined submission (merged PDFs)

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • combined_submission_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

get_data_request(connection, data_request_id, opts \\ [])

View Source
@spec get_data_request(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.SubmissionDataRequest.t()} | {:error, Tesla.Env.t()}

Look up a submission data request

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • data_request_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

get_full_template(connection, template_id, opts \\ [])

View Source
@spec get_full_template(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.FullTemplate.t()} | {:error, Tesla.Env.t()}

Fetch the full template attributes

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

get_presign_url(connection, opts \\ [])

View Source
@spec get_presign_url(
  Tesla.Env.client(),
  keyword()
) :: {:ok, map()} | {:error, Tesla.Env.t()}

Get a presigned URL so that you can upload a file to our AWS S3 bucket

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

get_submission(connection, submission_id, opts \\ [])

View Source
@spec get_submission(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.Submission.t()} | {:error, Tesla.Env.t()}

Check the status of a PDF

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • submission_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :include_data (boolean()):

returns

Returns

} on success {:error, info} on failure

Link to this function

get_submission_batch(connection, submission_batch_id, opts \\ [])

View Source
@spec get_submission_batch(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.SubmissionBatch.t()} | {:error, Tesla.Env.t()}

Check the status of a submission batch job

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • submission_batch_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :include_submissions (boolean()):

returns

Returns

} on success {:error, info} on failure

Link to this function

get_template(connection, template_id, opts \\ [])

View Source
@spec get_template(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.Template.t()} | {:error, Tesla.Env.t()}

Check the status of an uploaded template

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

get_template_schema(connection, template_id, opts \\ [])

View Source
@spec get_template_schema(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Tesla.Env.t()}

Fetch the JSON schema for a template

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

list_folders(connection, opts \\ [])

View Source
@spec list_folders(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [Docspring.Model.Folder.t()]} | {:error, Tesla.Env.t()}

Get a list of all folders

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :parent_folder_id (String.t): Filter By Folder Id

returns

Returns

, ...]} on success {:error, info} on failure

Link to this function

list_submissions(connection, opts \\ [])

View Source
@spec list_submissions(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Docspring.Model.ListSubmissionsResponse.t()} | {:error, Tesla.Env.t()}

List all submissions

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :cursor (String.t):
    • :limit (float()):
    • :created_after (String.t):
    • :created_before (String.t):
    • :type (String.t):
    • :include_data (boolean()):

returns

Returns

} on success {:error, info} on failure

Link to this function

list_submissions_0(connection, template_id, opts \\ [])

View Source
@spec list_submissions_0(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.ListSubmissionsResponse.t()} | {:error, Tesla.Env.t()}

List all submissions for a given template

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :cursor (String.t):
    • :limit (float()):
    • :created_after (String.t):
    • :created_before (String.t):
    • :type (String.t):
    • :include_data (boolean()):

returns

Returns

} on success {:error, info} on failure

Link to this function

list_templates(connection, opts \\ [])

View Source
@spec list_templates(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [Docspring.Model.Template.t()]} | {:error, Tesla.Env.t()}

Get a list of all templates

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :query (String.t): Search By Name
    • :parent_folder_id (String.t): Filter By Folder Id
    • :page (integer()): Default: 1
    • :per_page (integer()): Default: 50

returns

Returns

, ...]} on success {:error, info} on failure

Link to this function

move_folder_to_folder(connection, folder_id, opts \\ [])

View Source
@spec move_folder_to_folder(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.Folder.t()} | {:error, Tesla.Env.t()}

Move a folder

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • folder_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :move_folder_data (MoveFolderData):

returns

Returns

} on success {:error, info} on failure

Link to this function

move_template_to_folder(connection, template_id, opts \\ [])

View Source
@spec move_template_to_folder(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.Template.t()} | {:error, Tesla.Env.t()}

Move Template to folder

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :move_template_data (MoveTemplateData):

returns

Returns

} on success {:error, info} on failure

Link to this function

rename_folder(connection, folder_id, opts \\ [])

View Source
@spec rename_folder(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Rename a folder

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • folder_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :rename_folder_data (RenameFolderData):

returns

Returns

} on success {:error, info} on failure

Link to this function

test_authentication(connection, opts \\ [])

View Source
@spec test_authentication(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Docspring.Model.AuthenticationSuccessResponse.t()}
  | {:error, Tesla.Env.t()}

Test Authentication

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

} on success {:error, info} on failure

Link to this function

update_data_request(connection, data_request_id, opts \\ [])

View Source
@spec update_data_request(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.UpdateDataRequestResponse.t()} | {:error, Tesla.Env.t()}

Update a submission data request

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • data_request_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :update_submission_data_request_data (UpdateSubmissionDataRequestData):

returns

Returns

} on success {:error, info} on failure

Link to this function

update_template(connection, template_id, opts \\ [])

View Source
@spec update_template(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Docspring.Model.UpdateTemplateResponse.t()} | {:error, Tesla.Env.t()}

Update a Template

parameters

Parameters

  • connection (Docspring.Connection): Connection to server
  • template_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :update_template_data (UpdateTemplateData):

returns

Returns

} on success {:error, info} on failure