|
1 | 1 | # signrequest-php-client |
| 2 | + |
| 3 | +API for SignRequest.com |
| 4 | + |
| 5 | +## Requirements |
| 6 | + |
| 7 | +PHP 5.5 and later |
| 8 | + |
| 9 | +## Installation & Usage |
| 10 | + |
| 11 | +### Composer |
| 12 | + |
| 13 | +To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: |
| 14 | + |
| 15 | +``` |
| 16 | +{ |
| 17 | + "require": { |
| 18 | + "signrequest/signrequest-client": "1.0.*" |
| 19 | + } |
| 20 | +} |
| 21 | +``` |
| 22 | + |
| 23 | +Then run `composer install` |
| 24 | + |
| 25 | +### Manual Installation |
| 26 | + |
| 27 | +Download the files and include `autoload.php`: |
| 28 | + |
| 29 | +```php |
| 30 | + require_once('/path/to/signrequest-php-client/vendor/autoload.php'); |
| 31 | +``` |
| 32 | + |
| 33 | +## Tests |
| 34 | + |
| 35 | +To run the unit tests: |
| 36 | + |
| 37 | +``` |
| 38 | +composer install |
| 39 | +./vendor/bin/phpunit |
| 40 | +``` |
| 41 | + |
| 42 | +## Getting Started |
| 43 | + |
| 44 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 45 | + |
| 46 | +```php |
| 47 | +<?php |
| 48 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 49 | + |
| 50 | +// Configure API key authorization: Token |
| 51 | +$config = SignRequest\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); |
| 52 | +$config = SignRequest\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Token'); |
| 53 | + |
| 54 | +$apiInstance = new SignRequest\Api\DocumentsApi( |
| 55 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 56 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 57 | + new GuzzleHttp\Client(), |
| 58 | + $config |
| 59 | +); |
| 60 | +$data = new \SignRequest\Model\Document(); // \SignRequest\Model\Document | |
| 61 | +$data->setFileFromUrl('https://docs.google.com/document/d/1oI2R1SxfMNZXiz3jCQvorpoklF9xq_dCJnOpkI-zo80/edit?usp=sharing'); |
| 62 | + |
| 63 | +try { |
| 64 | + $result = $apiInstance->documentsCreate($data); |
| 65 | + print_r($result); |
| 66 | +} catch (Exception $e) { |
| 67 | + echo 'Exception when calling DocumentsApi->documentsCreate: ', $e->getMessage(), PHP_EOL; |
| 68 | +} |
| 69 | + |
| 70 | +?> |
| 71 | +``` |
| 72 | + |
| 73 | +## Documentation for API Endpoints |
| 74 | + |
| 75 | +All URIs are relative to _https://signrequest.com/api/v1_ |
| 76 | + |
| 77 | +| Class | Method | HTTP request | Description | |
| 78 | +| --------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | --------------------------------------- | |
| 79 | +| _ApiTokensApi_ | [**apiTokensCreate**](docs/Api/ApiTokensApi.md#apitokenscreate) | **POST** /api-tokens/ | Create an API token | |
| 80 | +| _ApiTokensApi_ | [**apiTokensDelete**](docs/Api/ApiTokensApi.md#apitokensdelete) | **DELETE** /api-tokens/{key}/ | Delete an API token | |
| 81 | +| _ApiTokensApi_ | [**apiTokensList**](docs/Api/ApiTokensApi.md#apitokenslist) | **GET** /api-tokens/ | Retrieve a list of API tokens | |
| 82 | +| _ApiTokensApi_ | [**apiTokensRead**](docs/Api/ApiTokensApi.md#apitokensread) | **GET** /api-tokens/{key}/ | Retrieve an API token | |
| 83 | +| _DocumentAttachmentsApi_ | [**documentAttachmentsCreate**](docs/Api/DocumentAttachmentsApi.md#documentattachmentscreate) | **POST** /document-attachments/ | Create a Document Attachment | |
| 84 | +| _DocumentAttachmentsApi_ | [**documentAttachmentsList**](docs/Api/DocumentAttachmentsApi.md#documentattachmentslist) | **GET** /document-attachments/ | Retrieve a list of Document Attachments | |
| 85 | +| _DocumentAttachmentsApi_ | [**documentAttachmentsRead**](docs/Api/DocumentAttachmentsApi.md#documentattachmentsread) | **GET** /document-attachments/{uuid}/ | Retrieve a Document Attachment | |
| 86 | +| _DocumentsApi_ | [**documentsCreate**](docs/Api/DocumentsApi.md#documentscreate) | **POST** /documents/ | Create a Document | |
| 87 | +| _DocumentsApi_ | [**documentsDelete**](docs/Api/DocumentsApi.md#documentsdelete) | **DELETE** /documents/{uuid}/ | Delete a Document | |
| 88 | +| _DocumentsApi_ | [**documentsList**](docs/Api/DocumentsApi.md#documentslist) | **GET** /documents/ | Retrieve a list of Documents | |
| 89 | +| _DocumentsApi_ | [**documentsRead**](docs/Api/DocumentsApi.md#documentsread) | **GET** /documents/{uuid}/ | Retrieve a Document | |
| 90 | +| _DocumentsSearchApi_ | [**documentsSearchList**](docs/Api/DocumentsSearchApi.md#documentssearchlist) | **GET** /documents-search/ | Search documents | |
| 91 | +| _EventsApi_ | [**eventsList**](docs/Api/EventsApi.md#eventslist) | **GET** /events/ | Retrieve a list of Events | |
| 92 | +| _EventsApi_ | [**eventsRead**](docs/Api/EventsApi.md#eventsread) | **GET** /events/{id}/ | Retrieve an Event | |
| 93 | +| _SignrequestQuickCreateApi_ | [**signrequestQuickCreateCreate**](docs/Api/SignrequestQuickCreateApi.md#signrequestquickcreatecreate) | **POST** /signrequest-quick-create/ | Quick create a SignRequest | |
| 94 | +| _SignrequestsApi_ | [**signrequestsCancelSignrequest**](docs/Api/SignrequestsApi.md#signrequestscancelsignrequest) | **POST** /signrequests/{uuid}/cancel_signrequest/ | Cancel a SignRequest | |
| 95 | +| _SignrequestsApi_ | [**signrequestsCreate**](docs/Api/SignrequestsApi.md#signrequestscreate) | **POST** /signrequests/ | Create a SignRequest | |
| 96 | +| _SignrequestsApi_ | [**signrequestsList**](docs/Api/SignrequestsApi.md#signrequestslist) | **GET** /signrequests/ | Retrieve a list of SignRequests | |
| 97 | +| _SignrequestsApi_ | [**signrequestsRead**](docs/Api/SignrequestsApi.md#signrequestsread) | **GET** /signrequests/{uuid}/ | Retrieve a SignRequest | |
| 98 | +| _SignrequestsApi_ | [**signrequestsResendSignrequestEmail**](docs/Api/SignrequestsApi.md#signrequestsresendsignrequestemail) | **POST** /signrequests/{uuid}/resend_signrequest_email/ | Resend a SignRequest | |
| 99 | +| _TeamMembersApi_ | [**teamMembersList**](docs/Api/TeamMembersApi.md#teammemberslist) | **GET** /team-members/ | Retrieve a list of Team Members | |
| 100 | +| _TeamMembersApi_ | [**teamMembersRead**](docs/Api/TeamMembersApi.md#teammembersread) | **GET** /team-members/{uuid}/ | Retrieve a Team Member | |
| 101 | +| _TeamsApi_ | [**teamsCreate**](docs/Api/TeamsApi.md#teamscreate) | **POST** /teams/ | Create a Team | |
| 102 | +| _TeamsApi_ | [**teamsInviteMember**](docs/Api/TeamsApi.md#teamsinvitemember) | **POST** /teams/{subdomain}/invite_member/ | Invite a Team Member | |
| 103 | +| _TeamsApi_ | [**teamsList**](docs/Api/TeamsApi.md#teamslist) | **GET** /teams/ | Retrieve a list of Teams | |
| 104 | +| _TeamsApi_ | [**teamsPartialUpdate**](docs/Api/TeamsApi.md#teamspartialupdate) | **PATCH** /teams/{subdomain}/ | Update a Team | |
| 105 | +| _TeamsApi_ | [**teamsRead**](docs/Api/TeamsApi.md#teamsread) | **GET** /teams/{subdomain}/ | Retrieve a Team | |
| 106 | +| _TemplatesApi_ | [**templatesList**](docs/Api/TemplatesApi.md#templateslist) | **GET** /templates/ | Retrieve a list of Templates | |
| 107 | +| _TemplatesApi_ | [**templatesRead**](docs/Api/TemplatesApi.md#templatesread) | **GET** /templates/{uuid}/ | Retrieve a Template | |
| 108 | +| _WebhooksApi_ | [**webhooksCreate**](docs/Api/WebhooksApi.md#webhookscreate) | **POST** /webhooks/ | Create a Webhook | |
| 109 | +| _WebhooksApi_ | [**webhooksDelete**](docs/Api/WebhooksApi.md#webhooksdelete) | **DELETE** /webhooks/{uuid}/ | Delete a Webhook | |
| 110 | +| _WebhooksApi_ | [**webhooksList**](docs/Api/WebhooksApi.md#webhookslist) | **GET** /webhooks/ | Retrieve a list of Webhooks | |
| 111 | +| _WebhooksApi_ | [**webhooksPartialUpdate**](docs/Api/WebhooksApi.md#webhookspartialupdate) | **PATCH** /webhooks/{uuid}/ | Partially update a Webhook | |
| 112 | +| _WebhooksApi_ | [**webhooksRead**](docs/Api/WebhooksApi.md#webhooksread) | **GET** /webhooks/{uuid}/ | Retrieve a Webhook | |
| 113 | +| _WebhooksApi_ | [**webhooksUpdate**](docs/Api/WebhooksApi.md#webhooksupdate) | **PUT** /webhooks/{uuid}/ | Update a Webhook | |
| 114 | + |
| 115 | +## Documentation For Models |
| 116 | + |
| 117 | +- [AuthToken](docs/Model/AuthToken.md) |
| 118 | +- [Document](docs/Model/Document.md) |
| 119 | +- [DocumentAttachment](docs/Model/DocumentAttachment.md) |
| 120 | +- [DocumentSearch](docs/Model/DocumentSearch.md) |
| 121 | +- [DocumentSignerTemplateConf](docs/Model/DocumentSignerTemplateConf.md) |
| 122 | +- [Event](docs/Model/Event.md) |
| 123 | +- [FileFromSf](docs/Model/FileFromSf.md) |
| 124 | +- [InlineDocumentSignerIntegrationData](docs/Model/InlineDocumentSignerIntegrationData.md) |
| 125 | +- [InlineIntegrationData](docs/Model/InlineIntegrationData.md) |
| 126 | +- [InlinePrefillTags](docs/Model/InlinePrefillTags.md) |
| 127 | +- [InlineResponse200](docs/Model/InlineResponse200.md) |
| 128 | +- [InlineResponse2001](docs/Model/InlineResponse2001.md) |
| 129 | +- [InlineResponse2002](docs/Model/InlineResponse2002.md) |
| 130 | +- [InlineResponse2003](docs/Model/InlineResponse2003.md) |
| 131 | +- [InlineResponse2004](docs/Model/InlineResponse2004.md) |
| 132 | +- [InlineResponse2005](docs/Model/InlineResponse2005.md) |
| 133 | +- [InlineResponse2006](docs/Model/InlineResponse2006.md) |
| 134 | +- [InlineResponse2007](docs/Model/InlineResponse2007.md) |
| 135 | +- [InlineResponse2008](docs/Model/InlineResponse2008.md) |
| 136 | +- [InlineResponse2009](docs/Model/InlineResponse2009.md) |
| 137 | +- [InlineResponse201](docs/Model/InlineResponse201.md) |
| 138 | +- [InlineResponse2011](docs/Model/InlineResponse2011.md) |
| 139 | +- [InlineSignRequest](docs/Model/InlineSignRequest.md) |
| 140 | +- [InlineTeam](docs/Model/InlineTeam.md) |
| 141 | +- [InlineTeamMember](docs/Model/InlineTeamMember.md) |
| 142 | +- [InviteMember](docs/Model/InviteMember.md) |
| 143 | +- [Placeholder](docs/Model/Placeholder.md) |
| 144 | +- [RequiredAttachment](docs/Model/RequiredAttachment.md) |
| 145 | +- [SignRequest](docs/Model/SignRequest.md) |
| 146 | +- [SignRequestQuickCreate](docs/Model/SignRequestQuickCreate.md) |
| 147 | +- [Signer](docs/Model/Signer.md) |
| 148 | +- [SignerAttachment](docs/Model/SignerAttachment.md) |
| 149 | +- [SignerInputs](docs/Model/SignerInputs.md) |
| 150 | +- [SigningLog](docs/Model/SigningLog.md) |
| 151 | +- [Team](docs/Model/Team.md) |
| 152 | +- [TeamMember](docs/Model/TeamMember.md) |
| 153 | +- [Template](docs/Model/Template.md) |
| 154 | +- [User](docs/Model/User.md) |
| 155 | +- [WebhookSubscription](docs/Model/WebhookSubscription.md) |
| 156 | + |
| 157 | +## Documentation For Authorization |
| 158 | + |
| 159 | +## Token |
| 160 | + |
| 161 | +- **Type**: API key |
| 162 | +- **API key parameter name**: Authorization |
| 163 | +- **Location**: HTTP header |
| 164 | + |
| 165 | +## Author |
| 166 | + |
| 167 | +tech-support@signrequest.com |
0 commit comments