PHP code example of pandadoc / php-client

1. Go to this page and download the library: Download pandadoc/php-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pandadoc / php-client example snippets



fining the host is optional and defaults to https://api.pandadoc.com
# See Configuration.php for a list of all supported configuration parameters.
$apiKey = 'YOUR_API_KEY';
$config = PandaDoc\Client\Configuration::getDefaultConfiguration()
            ->setApiKey('Authorization', $apiKey)
            ->setApiKeyPrefix('Authorization', 'API-Key');

$apiInstance = new PandaDoc\Client\Api\TemplatesApi(
    // If you want to 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->listTemplates();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TemplatesApi->listTemplates: ', $e->getMessage(), PHP_EOL;
}

composer 
json
{
  "dadoc/php-client": "6.2.0"
  }
}