Skip to content

Latest commit

 

History

History
217 lines (151 loc) · 7.63 KB

File metadata and controls

217 lines (151 loc) · 7.63 KB

PandaDoc\Client\TemplatesApi

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

Method HTTP request Description
deleteTemplate() DELETE /public/v1/templates/{id} Delete Template
detailsTemplate() GET /public/v1/templates/{id}/details Details Template
listTemplates() GET /public/v1/templates List Templates

deleteTemplate()

deleteTemplate($id)

Delete Template

Delete a template

Example

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


// Configure API key authorization: apiKey
$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Setup prefix (e.g. Bearer) for API key, if needed
$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'API-Key');

// Configure OAuth2 access token for authorization: oauth2
// $config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PandaDoc\Client\Api\TemplatesApi(
    // 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 = EE8yUNg5HztqVAuH85He8V; // string | Template ID

try {
    $apiInstance->deleteTemplate($id);
} catch (Exception $e) {
    echo 'Exception when calling TemplatesApi->deleteTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Template ID

Return type

void (empty response body)

Authorization

apiKey, oauth2

HTTP request headers

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

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

detailsTemplate()

detailsTemplate($id): \PandaDoc\Client\Model\TemplateDetailsResponse

Details Template

Return detailed data about a template.

Example

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


// Configure API key authorization: apiKey
$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Setup prefix (e.g. Bearer) for API key, if needed
$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'API-Key');

// Configure OAuth2 access token for authorization: oauth2
// $config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PandaDoc\Client\Api\TemplatesApi(
    // 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 = EE8yUNg5HztqVAuH85He8V; // string | Template ID

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

Parameters

Name Type Description Notes
id string Template ID

Return type

\PandaDoc\Client\Model\TemplateDetailsResponse

Authorization

apiKey, oauth2

HTTP request headers

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

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

listTemplates()

listTemplates($q, $shared, $deleted, $count, $page, $id, $folderUuid, $tag, $fields): \PandaDoc\Client\Model\TemplateListResponse

List Templates

Optionally, filter by a search query or tags.

Example

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


// Configure API key authorization: apiKey
$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Setup prefix (e.g. Bearer) for API key, if needed
$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'API-Key');

// Configure OAuth2 access token for authorization: oauth2
// $config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PandaDoc\Client\Api\TemplatesApi(
    // 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
);
$q = Sample onboarding template; // string | Optional search query. Filter by template name.
$shared = True; // bool | Returns only the shared templates.
$deleted = True; // bool | Optional. Returns only the deleted templates.
$count = 10; // int | Optionally, specify how many templates to return. Default is 50 templates, maximum is 100 templates.
$page = 56; // int | Optionally, specify which page of the dataset to return.
$id = e9LxBesSL73AeZMzeYdfvV; // string | Optionally, specify template ID.
$folderUuid = xDKHoJ8DkwhiTQSUzNveCJ; // string | UUID of the folder where the templates are stored.
$tag = array('tag_example'); // string[] | Optional search tag. Filter by template tag.
$fields = 'fields_example'; // string | A comma-separated list of additional fields to include in the response.  Each field must be a valid template property.  Currently, only one additional field, `content_date_modified`, is supported.  For example, `GET /templates?fields=content_date_modified`.

try {
    $result = $apiInstance->listTemplates($q, $shared, $deleted, $count, $page, $id, $folderUuid, $tag, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TemplatesApi->listTemplates: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
q string Optional search query. Filter by template name. [optional]
shared bool Returns only the shared templates. [optional]
deleted bool Optional. Returns only the deleted templates. [optional]
count int Optionally, specify how many templates to return. Default is 50 templates, maximum is 100 templates. [optional]
page int Optionally, specify which page of the dataset to return. [optional]
id string Optionally, specify template ID. [optional]
folderUuid string UUID of the folder where the templates are stored. [optional]
tag string[] Optional search tag. Filter by template tag. [optional]
fields string A comma-separated list of additional fields to include in the response. Each field must be a valid template property. Currently, only one additional field, `content_date_modified`, is supported. For example, `GET /templates?fields=content_date_modified`. [optional]

Return type

\PandaDoc\Client\Model\TemplateListResponse

Authorization

apiKey, oauth2

HTTP request headers

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

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