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.12.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.12.0.gem
(for development, run gem install --dev ./form_api-1.12.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.12.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 |
request_body = nil # Array<Object> |
begin
#Generates multiple PDFs
result = api_instance.batch_generate_pdf_v1(template_id, request_body)
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://api.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_pdfs | POST /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files |
FormAPI::PDFApi | combine_submissions | POST /combined_submissions | Merge generated PDFs together |
FormAPI::PDFApi | create_custom_file_from_upload | POST /custom_files | Create a new custom file from a cached presign upload |
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_folder | POST /folders/ | Create a folder |
FormAPI::PDFApi | create_template | POST /templates | Upload a new PDF template with a file upload |
FormAPI::PDFApi | create_template_from_upload | POST /templates?v=2 | Create a new PDF template from a cached presign upload |
FormAPI::PDFApi | delete_folder | DELETE /folders/{folder_id} | Delete a folder |
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_presign_url | GET /uploads/presign | Get a presigned URL so that you can upload a file to our AWS S3 bucket |
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} | Get a single template |
FormAPI::PDFApi | get_template_schema | GET /templates/{template_id}/schema | Fetch the JSON schema for a template |
FormAPI::PDFApi | list_folders | GET /folders/ | Get a list of all folders |
FormAPI::PDFApi | list_templates | GET /templates | Get a list of all templates |
FormAPI::PDFApi | move_folder_to_folder | POST /folders/{folder_id}/move | Move a folder |
FormAPI::PDFApi | move_template_to_folder | POST /templates/{template_id}/move | Move Template to folder |
FormAPI::PDFApi | rename_folder | POST /folders/{folder_id}/rename | Rename a folder |
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
- FormAPI::AuthenticationError
- FormAPI::AuthenticationSuccessResponse
- FormAPI::CombinePdfsData
- FormAPI::CombinedSubmission
- FormAPI::CombinedSubmissionAction
- FormAPI::CombinedSubmissionData
- FormAPI::CreateCombinedSubmissionResponse
- FormAPI::CreateCustomFileData
- FormAPI::CreateCustomFileResponse
- FormAPI::CreateFolderData
- FormAPI::CreateSubmissionBatchResponse
- FormAPI::CreateSubmissionBatchSubmissionsResponse
- FormAPI::CreateSubmissionDataRequestData
- FormAPI::CreateSubmissionDataRequestTokenResponse
- FormAPI::CreateSubmissionDataRequestTokenResponseToken
- FormAPI::CreateSubmissionResponse
- FormAPI::CreateTemplateData
- FormAPI::CustomFile
- FormAPI::Error
- FormAPI::Folder
- FormAPI::FoldersFolder
- FormAPI::InvalidRequest
- FormAPI::MoveFolderData
- FormAPI::MoveTemplateData
- FormAPI::PendingTemplate
- FormAPI::RenameFolderData
- FormAPI::Submission
- FormAPI::SubmissionAction
- FormAPI::SubmissionBatch
- FormAPI::SubmissionBatchData
- FormAPI::SubmissionData
- FormAPI::SubmissionDataBatchRequest
- FormAPI::SubmissionDataRequest
- FormAPI::Template
- FormAPI::Templatesv2Template
- FormAPI::Templatesv2TemplateDocument
- FormAPI::Templatesv2TemplateDocumentMetadata
- FormAPI::UpdateDataRequestResponse
- FormAPI::UpdateSubmissionDataRequestData
Documentation for Authorization
api_token_basic
- Type: HTTP basic authentication