Skip to content

Latest commit

 

History

History
2252 lines (1565 loc) · 62.3 KB

PDFApi.md

File metadata and controls

2252 lines (1565 loc) · 62.3 KB

DocSpring\PDFApi

All URIs are relative to https://api.docspring.com/api/v1, except if the operation defines another base path.

Method HTTP request Description
addFieldsToTemplate() PUT /templates/{template_id}/add_fields Add new fields to a Template
batchGeneratePdfV1() POST /templates/{template_id}/submissions/batch Generates multiple PDFs
batchGeneratePdfs() POST /submissions/batches Generates multiple PDFs
combinePdfs() POST /combined_submissions?v=2 Merge submission PDFs, template PDFs, or custom files
combineSubmissions() POST /combined_submissions Merge generated PDFs together
copyTemplate() POST /templates/{template_id}/copy Copy a Template
createCustomFileFromUpload() POST /custom_files Create a new custom file from a cached presign upload
createDataRequestToken() POST /data_requests/{data_request_id}/tokens Creates a new data request token for form authentication
createFolder() POST /folders/ Create a folder
createHTMLTemplate() POST /templates?desc=html Create a new HTML template
createPDFTemplate() POST /templates Create a new PDF template with a form POST file upload
createPDFTemplateFromUpload() POST /templates?desc=cached_upload Create a new PDF template from a cached presign upload
deleteFolder() DELETE /folders/{folder_id} Delete a folder
deleteTemplate() DELETE /templates/{template_id} Delete a template
expireCombinedSubmission() DELETE /combined_submissions/{combined_submission_id} Expire a combined submission
expireSubmission() DELETE /submissions/{submission_id} Expire a PDF submission
generatePDF() POST /templates/{template_id}/submissions Generates a new PDF
getCombinedSubmission() GET /combined_submissions/{combined_submission_id} Check the status of a combined submission (merged PDFs)
getDataRequest() GET /data_requests/{data_request_id} Look up a submission data request
getFullTemplate() GET /templates/{template_id}?full=true Fetch the full template attributes
getPresignUrl() GET /uploads/presign Get a presigned URL so that you can upload a file to our AWS S3 bucket
getSubmission() GET /submissions/{submission_id} Check the status of a PDF
getSubmissionBatch() GET /submissions/batches/{submission_batch_id} Check the status of a submission batch job
getTemplate() GET /templates/{template_id} Check the status of an uploaded template
getTemplateSchema() GET /templates/{template_id}/schema Fetch the JSON schema for a template
listCombinedSubmissions() GET /combined_submissions Get a list of all combined submissions
listFolders() GET /folders/ Get a list of all folders
listSubmissions() GET /submissions List all submissions
listTemplateSubmissions() GET /templates/{template_id}/submissions List all submissions for a given template
listTemplates() GET /templates Get a list of all templates
moveFolderToFolder() POST /folders/{folder_id}/move Move a folder
moveTemplateToFolder() POST /templates/{template_id}/move Move Template to folder
renameFolder() POST /folders/{folder_id}/rename Rename a folder
testAuthentication() GET /authentication Test Authentication
updateDataRequest() PUT /data_requests/{data_request_id} Update a submission data request
updateTemplate() PUT /templates/{template_id} Update a Template

addFieldsToTemplate()

addFieldsToTemplate($template_id, $data): \DocSpring\Model\AddFieldsTemplateResponse

Add new fields to a Template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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_000000000000000002; // string
$data = new \DocSpring\Model\AddFieldsData(); // \DocSpring\Model\AddFieldsData

try {
    $result = $apiInstance->addFieldsToTemplate($template_id, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->addFieldsToTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string
data \DocSpring\Model\AddFieldsData

Return type

\DocSpring\Model\AddFieldsTemplateResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

batchGeneratePdfV1()

batchGeneratePdfV1($template_id, $data): \DocSpring\Model\CreateSubmissionResponse[]

Generates multiple PDFs

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
$data = array(new \DocSpring\Model\SubmissionData()); // \DocSpring\Model\SubmissionData[]

try {
    $result = $apiInstance->batchGeneratePdfV1($template_id, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->batchGeneratePdfV1: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string
data \DocSpring\Model\SubmissionData[]

Return type

\DocSpring\Model\CreateSubmissionResponse[]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

batchGeneratePdfs()

batchGeneratePdfs($data): \DocSpring\Model\CreateSubmissionBatchResponse

Generates multiple PDFs

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data = new \DocSpring\Model\SubmissionBatchData(); // \DocSpring\Model\SubmissionBatchData

try {
    $result = $apiInstance->batchGeneratePdfs($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->batchGeneratePdfs: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data \DocSpring\Model\SubmissionBatchData

Return type

\DocSpring\Model\CreateSubmissionBatchResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

combinePdfs()

combinePdfs($data): \DocSpring\Model\CreateCombinedSubmissionResponse

Merge submission PDFs, template PDFs, or custom files

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data = new \DocSpring\Model\CombinePdfsData(); // \DocSpring\Model\CombinePdfsData

try {
    $result = $apiInstance->combinePdfs($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->combinePdfs: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data \DocSpring\Model\CombinePdfsData

Return type

\DocSpring\Model\CreateCombinedSubmissionResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

combineSubmissions()

combineSubmissions($data): \DocSpring\Model\CreateCombinedSubmissionResponse

Merge generated PDFs together

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data = new \DocSpring\Model\CombinedSubmissionData(); // \DocSpring\Model\CombinedSubmissionData

try {
    $result = $apiInstance->combineSubmissions($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->combineSubmissions: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data \DocSpring\Model\CombinedSubmissionData

Return type

\DocSpring\Model\CreateCombinedSubmissionResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

copyTemplate()

copyTemplate($template_id, $data): \DocSpring\Model\Template

Copy a Template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
$data = new \DocSpring\Model\CopyTemplateData(); // \DocSpring\Model\CopyTemplateData

try {
    $result = $apiInstance->copyTemplate($template_id, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->copyTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string
data \DocSpring\Model\CopyTemplateData

Return type

\DocSpring\Model\Template

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createCustomFileFromUpload()

createCustomFileFromUpload($data): \DocSpring\Model\CreateCustomFileResponse

Create a new custom file from a cached presign upload

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data = new \DocSpring\Model\CreateCustomFileData(); // \DocSpring\Model\CreateCustomFileData

try {
    $result = $apiInstance->createCustomFileFromUpload($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->createCustomFileFromUpload: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data \DocSpring\Model\CreateCustomFileData

Return type

\DocSpring\Model\CreateCustomFileResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createDataRequestToken()

createDataRequestToken($data_request_id): \DocSpring\Model\CreateSubmissionDataRequestTokenResponse

Creates a new data request token for form authentication

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data_request_id = drq_000000000000000001; // string

try {
    $result = $apiInstance->createDataRequestToken($data_request_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->createDataRequestToken: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data_request_id string

Return type

\DocSpring\Model\CreateSubmissionDataRequestTokenResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createFolder()

createFolder($data): \DocSpring\Model\Folder

Create a folder

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data = new \DocSpring\Model\CreateFolderData(); // \DocSpring\Model\CreateFolderData

try {
    $result = $apiInstance->createFolder($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->createFolder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data \DocSpring\Model\CreateFolderData

Return type

\DocSpring\Model\Folder

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createHTMLTemplate()

createHTMLTemplate($data): \DocSpring\Model\PendingTemplate

Create a new HTML template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data = new \DocSpring\Model\CreateHtmlTemplateData(); // \DocSpring\Model\CreateHtmlTemplateData

try {
    $result = $apiInstance->createHTMLTemplate($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->createHTMLTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data \DocSpring\Model\CreateHtmlTemplateData

Return type

\DocSpring\Model\PendingTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createPDFTemplate()

createPDFTemplate($template_document, $template_name, $template_parent_folder_id): \DocSpring\Model\PendingTemplate

Create a new PDF template with a form POST file upload

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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_document = "/path/to/file.txt"; // \SplFileObject
$template_name = 'template_name_example'; // string
$template_parent_folder_id = 'template_parent_folder_id_example'; // string

try {
    $result = $apiInstance->createPDFTemplate($template_document, $template_name, $template_parent_folder_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->createPDFTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_document \SplFileObject**\SplFileObject**
template_name string
template_parent_folder_id string [optional]

Return type

\DocSpring\Model\PendingTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createPDFTemplateFromUpload()

createPDFTemplateFromUpload($data): \DocSpring\Model\PendingTemplate

Create a new PDF template from a cached presign upload

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data = new \DocSpring\Model\CreateTemplateFromUploadData(); // \DocSpring\Model\CreateTemplateFromUploadData

try {
    $result = $apiInstance->createPDFTemplateFromUpload($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->createPDFTemplateFromUpload: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data \DocSpring\Model\CreateTemplateFromUploadData

Return type

\DocSpring\Model\PendingTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFolder()

deleteFolder($folder_id): \DocSpring\Model\Folder

Delete a folder

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$folder_id = fld_000000000000000001; // string

try {
    $result = $apiInstance->deleteFolder($folder_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->deleteFolder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
folder_id string

Return type

\DocSpring\Model\Folder

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteTemplate()

deleteTemplate($template_id): \DocSpring\Model\DeleteTemplateResponse

Delete a template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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

try {
    $result = $apiInstance->deleteTemplate($template_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->deleteTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string

Return type

\DocSpring\Model\DeleteTemplateResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expireCombinedSubmission()

expireCombinedSubmission($combined_submission_id): \DocSpring\Model\CombinedSubmission

Expire a combined submission

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$combined_submission_id = com_000000000000000001; // string

try {
    $result = $apiInstance->expireCombinedSubmission($combined_submission_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->expireCombinedSubmission: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
combined_submission_id string

Return type

\DocSpring\Model\CombinedSubmission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

expireSubmission()

expireSubmission($submission_id): \DocSpring\Model\Submission

Expire a PDF submission

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$submission_id = sub_000000000000000001; // string

try {
    $result = $apiInstance->expireSubmission($submission_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->expireSubmission: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
submission_id string

Return type

\DocSpring\Model\Submission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

generatePDF()

generatePDF($template_id, $submission): \DocSpring\Model\CreateSubmissionResponse

Generates a new PDF

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
$submission = new \DocSpring\Model\CreateSubmissionData(); // \DocSpring\Model\CreateSubmissionData

try {
    $result = $apiInstance->generatePDF($template_id, $submission);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->generatePDF: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string
submission \DocSpring\Model\CreateSubmissionData

Return type

\DocSpring\Model\CreateSubmissionResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getCombinedSubmission()

getCombinedSubmission($combined_submission_id): \DocSpring\Model\CombinedSubmission

Check the status of a combined submission (merged PDFs)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$combined_submission_id = com_000000000000000001; // string

try {
    $result = $apiInstance->getCombinedSubmission($combined_submission_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getCombinedSubmission: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
combined_submission_id string

Return type

\DocSpring\Model\CombinedSubmission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getDataRequest()

getDataRequest($data_request_id): \DocSpring\Model\SubmissionDataRequest

Look up a submission data request

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data_request_id = drq_000000000000000001; // string

try {
    $result = $apiInstance->getDataRequest($data_request_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getDataRequest: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data_request_id string

Return type

\DocSpring\Model\SubmissionDataRequest

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFullTemplate()

getFullTemplate($template_id): \DocSpring\Model\FullTemplate

Fetch the full template attributes

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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

try {
    $result = $apiInstance->getFullTemplate($template_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getFullTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string

Return type

\DocSpring\Model\FullTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getPresignUrl()

getPresignUrl(): object

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);

try {
    $result = $apiInstance->getPresignUrl();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getPresignUrl: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

object

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSubmission()

getSubmission($submission_id, $include_data): \DocSpring\Model\Submission

Check the status of a PDF

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$submission_id = sub_000000000000000001; // string
$include_data = true; // bool

try {
    $result = $apiInstance->getSubmission($submission_id, $include_data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getSubmission: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
submission_id string
include_data bool [optional]

Return type

\DocSpring\Model\Submission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSubmissionBatch()

getSubmissionBatch($submission_batch_id, $include_submissions): \DocSpring\Model\SubmissionBatch

Check the status of a submission batch job

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$submission_batch_id = sbb_000000000000000001; // string
$include_submissions = true; // bool

try {
    $result = $apiInstance->getSubmissionBatch($submission_batch_id, $include_submissions);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getSubmissionBatch: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
submission_batch_id string
include_submissions bool [optional]

Return type

\DocSpring\Model\SubmissionBatch

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTemplate()

getTemplate($template_id): \DocSpring\Model\Template

Check the status of an uploaded template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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

try {
    $result = $apiInstance->getTemplate($template_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string

Return type

\DocSpring\Model\Template

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTemplateSchema()

getTemplateSchema($template_id): object

Fetch the JSON schema for a template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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

try {
    $result = $apiInstance->getTemplateSchema($template_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->getTemplateSchema: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string

Return type

object

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listCombinedSubmissions()

listCombinedSubmissions($page, $per_page): \DocSpring\Model\CombinedSubmission[]

Get a list of all combined submissions

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$page = 2; // int | Default: 1
$per_page = 1; // int | Default: 50

try {
    $result = $apiInstance->listCombinedSubmissions($page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->listCombinedSubmissions: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int Default: 1 [optional]
per_page int Default: 50 [optional]

Return type

\DocSpring\Model\CombinedSubmission[]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listFolders()

listFolders($parent_folder_id): \DocSpring\Model\Folder[]

Get a list of all folders

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$parent_folder_id = fld_000000000000000002; // string | Filter By Folder Id

try {
    $result = $apiInstance->listFolders($parent_folder_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->listFolders: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
parent_folder_id string Filter By Folder Id [optional]

Return type

\DocSpring\Model\Folder[]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listSubmissions()

listSubmissions($cursor, $limit, $created_after, $created_before, $type, $include_data): \DocSpring\Model\ListSubmissionsResponse

List all submissions

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$cursor = sub_list_000012; // string
$limit = 3; // float
$created_after = 2019-01-01T09:00:00-05:00; // string
$created_before = 2020-01-01T09:00:00.000+0200; // string
$type = test; // string
$include_data = true; // bool

try {
    $result = $apiInstance->listSubmissions($cursor, $limit, $created_after, $created_before, $type, $include_data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->listSubmissions: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
cursor string [optional]
limit float [optional]
created_after string [optional]
created_before string [optional]
type string [optional]
include_data bool [optional]

Return type

\DocSpring\Model\ListSubmissionsResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listTemplateSubmissions()

listTemplateSubmissions($template_id, $cursor, $limit, $created_after, $created_before, $type, $include_data): \DocSpring\Model\ListSubmissionsResponse

List all submissions for a given template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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_000000000000000002; // string
$cursor = 'cursor_example'; // string
$limit = 3.4; // float
$created_after = 'created_after_example'; // string
$created_before = 'created_before_example'; // string
$type = 'type_example'; // string
$include_data = true; // bool

try {
    $result = $apiInstance->listTemplateSubmissions($template_id, $cursor, $limit, $created_after, $created_before, $type, $include_data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->listTemplateSubmissions: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string
cursor string [optional]
limit float [optional]
created_after string [optional]
created_before string [optional]
type string [optional]
include_data bool [optional]

Return type

\DocSpring\Model\ListSubmissionsResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listTemplates()

listTemplates($query, $parent_folder_id, $page, $per_page): \DocSpring\Model\Template[]

Get a list of all templates

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$query = 2; // string | Search By Name
$parent_folder_id = fld_000000000000000001; // string | Filter By Folder Id
$page = 2; // int | Default: 1
$per_page = 1; // int | Default: 50

try {
    $result = $apiInstance->listTemplates($query, $parent_folder_id, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->listTemplates: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
query string Search By Name [optional]
parent_folder_id string Filter By Folder Id [optional]
page int Default: 1 [optional]
per_page int Default: 50 [optional]

Return type

\DocSpring\Model\Template[]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

moveFolderToFolder()

moveFolderToFolder($folder_id, $data): \DocSpring\Model\Folder

Move a folder

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$folder_id = fld_000000000000000001; // string
$data = new \DocSpring\Model\MoveFolderData(); // \DocSpring\Model\MoveFolderData

try {
    $result = $apiInstance->moveFolderToFolder($folder_id, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->moveFolderToFolder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
folder_id string
data \DocSpring\Model\MoveFolderData

Return type

\DocSpring\Model\Folder

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

moveTemplateToFolder()

moveTemplateToFolder($template_id, $data): \DocSpring\Model\Template

Move Template to folder

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
$data = new \DocSpring\Model\MoveTemplateData(); // \DocSpring\Model\MoveTemplateData

try {
    $result = $apiInstance->moveTemplateToFolder($template_id, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->moveTemplateToFolder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string
data \DocSpring\Model\MoveTemplateData

Return type

\DocSpring\Model\Template

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

renameFolder()

renameFolder($folder_id, $data)

Rename a folder

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$folder_id = fld_000000000000000001; // string
$data = new \DocSpring\Model\RenameFolderData(); // \DocSpring\Model\RenameFolderData

try {
    $apiInstance->renameFolder($folder_id, $data);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->renameFolder: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
folder_id string
data \DocSpring\Model\RenameFolderData

Return type

void (empty response body)

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

testAuthentication()

testAuthentication(): \DocSpring\Model\AuthenticationSuccessResponse

Test Authentication

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);

try {
    $result = $apiInstance->testAuthentication();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->testAuthentication: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\DocSpring\Model\AuthenticationSuccessResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateDataRequest()

updateDataRequest($data_request_id, $data): \DocSpring\Model\UpdateDataRequestResponse

Update a submission data request

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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
);
$data_request_id = drq_000000000000000001; // string
$data = new \DocSpring\Model\UpdateSubmissionDataRequestData(); // \DocSpring\Model\UpdateSubmissionDataRequestData

try {
    $result = $apiInstance->updateDataRequest($data_request_id, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->updateDataRequest: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
data_request_id string
data \DocSpring\Model\UpdateSubmissionDataRequestData

Return type

\DocSpring\Model\UpdateDataRequestResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateTemplate()

updateTemplate($template_id, $data): \DocSpring\Model\UpdateTemplateResponse

Update a Template

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new DocSpring\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_000000000000000003; // string
$data = new \DocSpring\Model\UpdateTemplateData(); // \DocSpring\Model\UpdateTemplateData

try {
    $result = $apiInstance->updateTemplate($template_id, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->updateTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
template_id string
data \DocSpring\Model\UpdateTemplateData

Return type

\DocSpring\Model\UpdateTemplateResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]