formapi / formapi
1.13.0
2019-10-09 17:51 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
FormAPI is a service that helps you fill out and sign PDF templates.
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: v1
- Package version: 1.13.0
- Build package: io.formapi.codegen.FormApiPhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/formapi/formapi.git"
}
],
"require": {
"formapi/formapi": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/FormAPI/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: api_token_basic $config = FormAPI\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new FormAPI\Api\PDFApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $template_id = tpl_000000000000000001; // string | $request_body = array(new \FormAPI\Model\array()); // object[] | try { $result = $apiInstance->batchGeneratePdfV1($template_id, $request_body); print_r($result); } catch (Exception $e) { echo 'Exception when calling PDFApi->batchGeneratePdfV1: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://api.formapi.io/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
PDFApi | batchGeneratePdfV1 | POST /templates/{template_id}/submissions/batch | Generates multiple PDFs |
PDFApi | batchGeneratePdfs | POST /submissions/batches | Generates multiple PDFs |
PDFApi | combinePdfs | POST /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files |
PDFApi | combineSubmissions | POST /combined_submissions | Merge generated PDFs together |
PDFApi | createCustomFileFromUpload | POST /custom_files | Create a new custom file from a cached presign upload |
PDFApi | createDataRequestToken | POST /data_requests/{data_request_id}/tokens | Creates a new data request token for form authentication |
PDFApi | createFolder | POST /folders/ | Create a folder |
PDFApi | createTemplate | POST /templates | Upload a new PDF template with a file upload |
PDFApi | createTemplateFromUpload | POST /templates?v=2 | Create a new PDF template from a cached presign upload |
PDFApi | deleteFolder | DELETE /folders/{folder_id} | Delete a folder |
PDFApi | expireCombinedSubmission | DELETE /combined_submissions/{combined_submission_id} | Expire a combined submission |
PDFApi | expireSubmission | DELETE /submissions/{submission_id} | Expire a PDF submission |
PDFApi | generatePDF | POST /templates/{template_id}/submissions | Generates a new PDF |
PDFApi | getCombinedSubmission | GET /combined_submissions/{combined_submission_id} | Check the status of a combined submission (merged PDFs) |
PDFApi | getDataRequest | GET /data_requests/{data_request_id} | Look up a submission data request |
PDFApi | getPresignUrl | GET /uploads/presign | Get a presigned URL so that you can upload a file to our AWS S3 bucket |
PDFApi | getSubmission | GET /submissions/{submission_id} | Check the status of a PDF |
PDFApi | getSubmissionBatch | GET /submissions/batches/{submission_batch_id} | Check the status of a submission batch job |
PDFApi | getTemplate | GET /templates/{template_id} | Get a single template |
PDFApi | getTemplateSchema | GET /templates/{template_id}/schema | Fetch the JSON schema for a template |
PDFApi | listFolders | GET /folders/ | Get a list of all folders |
PDFApi | listTemplates | GET /templates | Get a list of all templates |
PDFApi | moveFolderToFolder | POST /folders/{folder_id}/move | Move a folder |
PDFApi | moveTemplateToFolder | POST /templates/{template_id}/move | Move Template to folder |
PDFApi | renameFolder | POST /folders/{folder_id}/rename | Rename a folder |
PDFApi | testAuthentication | GET /authentication | Test Authentication |
PDFApi | updateDataRequest | PUT /data_requests/{data_request_id} | Update a submission data request |
Documentation For Models
- AuthenticationError
- AuthenticationSuccessResponse
- CombinePdfsData
- CombinedSubmission
- CombinedSubmissionAction
- CombinedSubmissionData
- CreateCombinedSubmissionResponse
- CreateCustomFileData
- CreateCustomFileResponse
- CreateFolderData
- CreateSubmissionBatchResponse
- CreateSubmissionBatchSubmissionsResponse
- CreateSubmissionDataRequestData
- CreateSubmissionDataRequestTokenResponse
- CreateSubmissionDataRequestTokenResponseToken
- CreateSubmissionResponse
- CreateTemplateData
- CustomFile
- Error
- Folder
- FoldersFolder
- InvalidRequest
- MoveFolderData
- MoveTemplateData
- PendingTemplate
- RenameFolderData
- Submission
- SubmissionAction
- SubmissionBatch
- SubmissionBatchData
- SubmissionData
- SubmissionDataBatchRequest
- SubmissionDataRequest
- Template
- Templatesv2Template
- Templatesv2TemplateDocument
- Templatesv2TemplateDocumentMetadata
- UpdateDataRequestResponse
- UpdateSubmissionDataRequestData
Documentation For Authorization
api_token_basic
- Type: HTTP basic authentication