form_api

FormAPI - the Ruby gem for the API v1

FormAPI is a service that helps you fill out and sign PDF templates.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 1.4.0
  • Build package: io.formapi.codegen.FormApiRubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build form_api.gemspec

Then either install the gem locally:

gem install ./form_api-1.4.0.gem

(for development, run gem install --dev ./form_api-1.4.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'form_api', '~> 1.4.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'form_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'form_api'

# Setup authorization
FormAPI.configure do |config|
  # Configure HTTP basic authorization: api_token_basic
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = FormAPI::PDFApi.new
template_id = 'tpl_000000000000000001' # String | 
create_submission_data_batch_v1 = nil # Array<CreateSubmissionDataBatchV1> | 

begin
  #Generates multiple PDFs
  result = api_instance.batch_generate_pdf_v1(template_id, create_submission_data_batch_v1)
  p result
rescue FormAPI::ApiError => e
  puts "Exception when calling PDFApi->batch_generate_pdf_v1: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://app.formapi.io/api/v1

Class Method HTTP request Description
FormAPI::PDFApi batch_generate_pdf_v1 POST /templates/template_id/submissions/batch Generates multiple PDFs
FormAPI::PDFApi batch_generate_pdfs POST /submissions/batches Generates multiple PDFs
FormAPI::PDFApi combine_submissions POST /combined_submissions Merge generated PDFs together
FormAPI::PDFApi create_data_request_token POST /data_requests/data_request_id/tokens Creates a new data request token for form authentication
FormAPI::PDFApi create_template POST /templates Upload a new PDF template
FormAPI::PDFApi expire_combined_submission DELETE /combined_submissions/combined_submission_id Expire a combined submission
FormAPI::PDFApi expire_submission DELETE /submissions/submission_id Expire a PDF submission
FormAPI::PDFApi generate_pdf POST /templates/template_id/submissions Generates a new PDF
FormAPI::PDFApi get_combined_submission GET /combined_submissions/combined_submission_id Check the status of a combined submission (merged PDFs)
FormAPI::PDFApi get_data_request GET /data_requests/data_request_id Look up a submission data request
FormAPI::PDFApi get_submission GET /submissions/submission_id Check the status of a PDF
FormAPI::PDFApi get_submission_batch GET /submissions/batches/submission_batch_id Check the status of a submission batch job
FormAPI::PDFApi get_template GET /templates/template_id Check the status of an uploaded template
FormAPI::PDFApi get_template_schema GET /templates/template_id/schema Fetch the JSON schema for a template
FormAPI::PDFApi get_templates GET /templates Get a list of all templates
FormAPI::PDFApi test_authentication GET /authentication Test Authentication
FormAPI::PDFApi update_data_request PUT /data_requests/data_request_id Update a submission data request

Documentation for Models

Documentation for Authorization

api_token_basic

  • Type: HTTP basic authentication