https://github.com/docspring/formapi-php
PHP API client for FormAPI
https://github.com/docspring/formapi-php
Last synced: 12 months ago
JSON representation
PHP API client for FormAPI
- Host: GitHub
- URL: https://github.com/docspring/formapi-php
- Owner: DocSpring
- License: mit
- Created: 2018-03-26T14:44:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T17:51:11.000Z (over 6 years ago)
- Last Synced: 2025-06-21T06:04:45.221Z (12 months ago)
- Language: PHP
- Homepage: https://packagist.org/packages/formapi/formapi
- Size: 203 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# FormAPI
FormAPI is a service that helps you fill out and sign PDF templates.
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) 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](http://getcomposer.org/), 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`:
```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](#installation--usage) and then run the following:
```php
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**](docs/Api/PDFApi.md#batchgeneratepdfv1) | **POST** /templates/{template_id}/submissions/batch | Generates multiple PDFs
*PDFApi* | [**batchGeneratePdfs**](docs/Api/PDFApi.md#batchgeneratepdfs) | **POST** /submissions/batches | Generates multiple PDFs
*PDFApi* | [**combinePdfs**](docs/Api/PDFApi.md#combinepdfs) | **POST** /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files
*PDFApi* | [**combineSubmissions**](docs/Api/PDFApi.md#combinesubmissions) | **POST** /combined_submissions | Merge generated PDFs together
*PDFApi* | [**createCustomFileFromUpload**](docs/Api/PDFApi.md#createcustomfilefromupload) | **POST** /custom_files | Create a new custom file from a cached presign upload
*PDFApi* | [**createDataRequestToken**](docs/Api/PDFApi.md#createdatarequesttoken) | **POST** /data_requests/{data_request_id}/tokens | Creates a new data request token for form authentication
*PDFApi* | [**createFolder**](docs/Api/PDFApi.md#createfolder) | **POST** /folders/ | Create a folder
*PDFApi* | [**createTemplate**](docs/Api/PDFApi.md#createtemplate) | **POST** /templates | Upload a new PDF template with a file upload
*PDFApi* | [**createTemplateFromUpload**](docs/Api/PDFApi.md#createtemplatefromupload) | **POST** /templates?v=2 | Create a new PDF template from a cached presign upload
*PDFApi* | [**deleteFolder**](docs/Api/PDFApi.md#deletefolder) | **DELETE** /folders/{folder_id} | Delete a folder
*PDFApi* | [**expireCombinedSubmission**](docs/Api/PDFApi.md#expirecombinedsubmission) | **DELETE** /combined_submissions/{combined_submission_id} | Expire a combined submission
*PDFApi* | [**expireSubmission**](docs/Api/PDFApi.md#expiresubmission) | **DELETE** /submissions/{submission_id} | Expire a PDF submission
*PDFApi* | [**generatePDF**](docs/Api/PDFApi.md#generatepdf) | **POST** /templates/{template_id}/submissions | Generates a new PDF
*PDFApi* | [**getCombinedSubmission**](docs/Api/PDFApi.md#getcombinedsubmission) | **GET** /combined_submissions/{combined_submission_id} | Check the status of a combined submission (merged PDFs)
*PDFApi* | [**getDataRequest**](docs/Api/PDFApi.md#getdatarequest) | **GET** /data_requests/{data_request_id} | Look up a submission data request
*PDFApi* | [**getPresignUrl**](docs/Api/PDFApi.md#getpresignurl) | **GET** /uploads/presign | Get a presigned URL so that you can upload a file to our AWS S3 bucket
*PDFApi* | [**getSubmission**](docs/Api/PDFApi.md#getsubmission) | **GET** /submissions/{submission_id} | Check the status of a PDF
*PDFApi* | [**getSubmissionBatch**](docs/Api/PDFApi.md#getsubmissionbatch) | **GET** /submissions/batches/{submission_batch_id} | Check the status of a submission batch job
*PDFApi* | [**getTemplate**](docs/Api/PDFApi.md#gettemplate) | **GET** /templates/{template_id} | Get a single template
*PDFApi* | [**getTemplateSchema**](docs/Api/PDFApi.md#gettemplateschema) | **GET** /templates/{template_id}/schema | Fetch the JSON schema for a template
*PDFApi* | [**listFolders**](docs/Api/PDFApi.md#listfolders) | **GET** /folders/ | Get a list of all folders
*PDFApi* | [**listTemplates**](docs/Api/PDFApi.md#listtemplates) | **GET** /templates | Get a list of all templates
*PDFApi* | [**moveFolderToFolder**](docs/Api/PDFApi.md#movefoldertofolder) | **POST** /folders/{folder_id}/move | Move a folder
*PDFApi* | [**moveTemplateToFolder**](docs/Api/PDFApi.md#movetemplatetofolder) | **POST** /templates/{template_id}/move | Move Template to folder
*PDFApi* | [**renameFolder**](docs/Api/PDFApi.md#renamefolder) | **POST** /folders/{folder_id}/rename | Rename a folder
*PDFApi* | [**testAuthentication**](docs/Api/PDFApi.md#testauthentication) | **GET** /authentication | Test Authentication
*PDFApi* | [**updateDataRequest**](docs/Api/PDFApi.md#updatedatarequest) | **PUT** /data_requests/{data_request_id} | Update a submission data request
## Documentation For Models
- [AuthenticationError](docs/Model/AuthenticationError.md)
- [AuthenticationSuccessResponse](docs/Model/AuthenticationSuccessResponse.md)
- [CombinePdfsData](docs/Model/CombinePdfsData.md)
- [CombinedSubmission](docs/Model/CombinedSubmission.md)
- [CombinedSubmissionAction](docs/Model/CombinedSubmissionAction.md)
- [CombinedSubmissionData](docs/Model/CombinedSubmissionData.md)
- [CreateCombinedSubmissionResponse](docs/Model/CreateCombinedSubmissionResponse.md)
- [CreateCustomFileData](docs/Model/CreateCustomFileData.md)
- [CreateCustomFileResponse](docs/Model/CreateCustomFileResponse.md)
- [CreateFolderData](docs/Model/CreateFolderData.md)
- [CreateSubmissionBatchResponse](docs/Model/CreateSubmissionBatchResponse.md)
- [CreateSubmissionBatchSubmissionsResponse](docs/Model/CreateSubmissionBatchSubmissionsResponse.md)
- [CreateSubmissionDataRequestData](docs/Model/CreateSubmissionDataRequestData.md)
- [CreateSubmissionDataRequestTokenResponse](docs/Model/CreateSubmissionDataRequestTokenResponse.md)
- [CreateSubmissionDataRequestTokenResponseToken](docs/Model/CreateSubmissionDataRequestTokenResponseToken.md)
- [CreateSubmissionResponse](docs/Model/CreateSubmissionResponse.md)
- [CreateTemplateData](docs/Model/CreateTemplateData.md)
- [CustomFile](docs/Model/CustomFile.md)
- [Error](docs/Model/Error.md)
- [Folder](docs/Model/Folder.md)
- [FoldersFolder](docs/Model/FoldersFolder.md)
- [InvalidRequest](docs/Model/InvalidRequest.md)
- [MoveFolderData](docs/Model/MoveFolderData.md)
- [MoveTemplateData](docs/Model/MoveTemplateData.md)
- [PendingTemplate](docs/Model/PendingTemplate.md)
- [RenameFolderData](docs/Model/RenameFolderData.md)
- [Submission](docs/Model/Submission.md)
- [SubmissionAction](docs/Model/SubmissionAction.md)
- [SubmissionBatch](docs/Model/SubmissionBatch.md)
- [SubmissionBatchData](docs/Model/SubmissionBatchData.md)
- [SubmissionData](docs/Model/SubmissionData.md)
- [SubmissionDataBatchRequest](docs/Model/SubmissionDataBatchRequest.md)
- [SubmissionDataRequest](docs/Model/SubmissionDataRequest.md)
- [Template](docs/Model/Template.md)
- [Templatesv2Template](docs/Model/Templatesv2Template.md)
- [Templatesv2TemplateDocument](docs/Model/Templatesv2TemplateDocument.md)
- [Templatesv2TemplateDocumentMetadata](docs/Model/Templatesv2TemplateDocumentMetadata.md)
- [UpdateDataRequestResponse](docs/Model/UpdateDataRequestResponse.md)
- [UpdateSubmissionDataRequestData](docs/Model/UpdateSubmissionDataRequestData.md)
## Documentation For Authorization
## api_token_basic
- **Type**: HTTP basic authentication
## Author