Skip to content

SignRequest/signrequest-php-client

Repository files navigation

signrequest-php-client

API for SignRequest.com

PHP version

Example on how to use this

https://github.com/SignRequest/signrequest-php-example

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

{
  "require": {
    "signrequest/signrequest-client": "1.3.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/signrequest-php-client/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

API Documentation

Full API documentation, including code samples, can be found here: https://signrequest.com/api/v1/docs/

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure API key authorization: Token
$config = SignRequest\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = SignRequest\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token');

$apiInstance = new SignRequest\Api\DocumentsApi(
    // 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 \SignRequest\Model\Document(); // \SignRequest\Model\Document |
$data->setFileFromUrl('https://docs.google.com/document/d/1oI2R1SxfMNZXiz3jCQvorpoklF9xq_dCJnOpkI-zo80/edit?usp=sharing');

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

?>

Documentation for API Endpoints

All URIs are relative to https://signrequest.com/api/v1

Class Method HTTP request Description
ApiTokensApi apiTokensList GET /api-tokens/ Retrieve a list of API tokens
DocumentAttachmentsApi documentAttachmentsCreate POST /document-attachments/ Create a Document Attachment
DocumentAttachmentsApi documentAttachmentsList GET /document-attachments/ Retrieve a list of Document Attachments
DocumentAttachmentsApi documentAttachmentsRead GET /document-attachments/{uuid}/ Retrieve a Document Attachment
DocumentsApi documentsCreate POST /documents/ Create a Document
DocumentsApi documentsDelete DELETE /documents/{uuid}/ Delete a Document
DocumentsApi documentsList GET /documents/ Retrieve a list of Documents
DocumentsApi documentsRead GET /documents/{uuid}/ Retrieve a Document
DocumentsSearchApi documentsSearchList GET /documents-search/ Search documents
EventsApi eventsList GET /events/ Retrieve a list of Events
EventsApi eventsRead GET /events/{id}/ Retrieve an Event
SignrequestQuickCreateApi signrequestQuickCreateCreate POST /signrequest-quick-create/ Quick create a SignRequest
SignrequestsApi signrequestsCancelSignrequest POST /signrequests/{uuid}/cancel_signrequest/ Cancel a SignRequest
SignrequestsApi signrequestsCreate POST /signrequests/ Create a SignRequest
SignrequestsApi signrequestsList GET /signrequests/ Retrieve a list of SignRequests
SignrequestsApi signrequestsRead GET /signrequests/{uuid}/ Retrieve a SignRequest
SignrequestsApi signrequestsResendSignrequestEmail POST /signrequests/{uuid}/resend_signrequest_email/ Resend a SignRequest
TeamMembersApi teamMembersList GET /team-members/ Retrieve a list of Team Members
TeamMembersApi teamMembersRead GET /team-members/{uuid}/ Retrieve a Team Member
TeamsApi teamsCreate POST /teams/ Create a Team
TeamsApi teamsDelete DELETE /teams/{subdomain}/ Delete a Team
TeamsApi teamsInviteMember POST /teams/{subdomain}/invite_member/ Invite a Team Member
TeamsApi teamsList GET /teams/ Retrieve a list of Teams
TeamsApi teamsPartialUpdate PATCH /teams/{subdomain}/ Update a Team
TeamsApi teamsRead GET /teams/{subdomain}/ Retrieve a Team
TemplatesApi templatesList GET /templates/ Retrieve a list of Templates
TemplatesApi templatesRead GET /templates/{uuid}/ Retrieve a Template
WebhooksApi webhooksCreate POST /webhooks/ Create a Webhook
WebhooksApi webhooksDelete DELETE /webhooks/{uuid}/ Delete a Webhook
WebhooksApi webhooksList GET /webhooks/ Retrieve a list of Webhooks
WebhooksApi webhooksPartialUpdate PATCH /webhooks/{uuid}/ Partially update a Webhook
WebhooksApi webhooksRead GET /webhooks/{uuid}/ Retrieve a Webhook
WebhooksApi webhooksUpdate PUT /webhooks/{uuid}/ Update a Webhook

Documentation For Models

Documentation For Authorization

Token

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

[email protected]