Skip to content

docusealco/docuseal-php

Repository files navigation

Docuseal

DocuSeal API specs

For more information, please visit https://www.docuseal.com.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/docusealco/docuseal-php.git"
    }
  ],
  "require": {
    "docusealco/docuseal-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/Docuseal/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure API key authorization: AuthToken
$config = Docuseal\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to change the default host
// $config->setHost('https://api.docuseal.com')

// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Docuseal\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');


$apiInstance = new Docuseal\Api\SubmissionsApi(
    // 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
);
$id = 1001; // int | The unique identifier of the submission.

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

API Endpoints

All URIs are relative to https://api.docuseal.com

Class Method HTTP request Description
SubmissionsApi archiveSubmission DELETE /submissions/{id} Archive a submission
SubmissionsApi createSubmission POST /submissions Create a submission
SubmissionsApi createSubmissionsFromEmails POST /submissions/emails Create submissions from emails
SubmissionsApi getSubmission GET /submissions/{id} Get a submission
SubmissionsApi getSubmissions GET /submissions List all submissions
SubmittersApi getSubmitter GET /submitters/{id} Get a submitter
SubmittersApi getSubmitters GET /submitters List all submitters
SubmittersApi updateSubmitter PUT /submitters/{id} Update a submitter
TemplatesApi addDocumentToTemplate PUT /templates/{id}/documents Update template documents
TemplatesApi archiveTemplate DELETE /templates/{id} Archive a template
TemplatesApi cloneTemplate POST /templates/{id}/clone Clone a template
TemplatesApi createTemplateFromDocx POST /templates/docx Create a template from Word DOCX
TemplatesApi createTemplateFromHtml POST /templates/html Create a template from HTML
TemplatesApi createTemplateFromPdf POST /templates/pdf Create a template from existing PDF
TemplatesApi getTemplate GET /templates/{id} Get a template
TemplatesApi getTemplates GET /templates List all templates
TemplatesApi mergeTemplate POST /templates/merge Merge templates
TemplatesApi updateTemplate PUT /templates/{id} Update a template

Models

Authorization

Authentication schemes defined for the API:

AuthToken

  • Type: API key
  • API key parameter name: X-Auth-Token
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

[email protected]

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
    • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen