Skip to content

Latest commit

 

History

History
310 lines (207 loc) · 8.71 KB

WebhookApi.md

File metadata and controls

310 lines (207 loc) · 8.71 KB

Yousign\Client\WebhookApi

All URIs are relative to https://api-sandbox.yousign.app/v3, except if the operation defines another base path.

Method HTTP request Description
deleteWebhooksWebhookId() DELETE /webhooks/{webhookId} Delete a Webhook subscription
getWebhooks() GET /webhooks List Webhook subscriptions
getWebhooksWebhookId() GET /webhooks/{webhookId} Get a Webhook subscription
patchWebhooksWebhookId() PATCH /webhooks/{webhookId} Update a Webhook subscription
postWebhooksSubscriptions() POST /webhooks Create a Webhook subscription

deleteWebhooksWebhookId()

deleteWebhooksWebhookId($webhook_id)

Delete a Webhook subscription

Deletes a given Webhook subscription.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WebhookApi(
    // 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
);
$webhook_id = 'webhook_id_example'; // string | Webhook Id

try {
    $apiInstance->deleteWebhooksWebhookId($webhook_id);
} catch (Exception $e) {
    echo 'Exception when calling WebhookApi->deleteWebhooksWebhookId: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
webhook_id string Webhook Id

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

getWebhooks()

getWebhooks(): \Yousign\Client\Model\WebhookSubscription[]

List Webhook subscriptions

Returns the list of all Webhook subscriptions in your Organization.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WebhookApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\Yousign\Client\Model\WebhookSubscription[]

Authorization

bearerAuth

HTTP request headers

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

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

getWebhooksWebhookId()

getWebhooksWebhookId($webhook_id): \Yousign\Client\Model\WebhookSubscription

Get a Webhook subscription

Retrieves a given Webhook subscription.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WebhookApi(
    // 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
);
$webhook_id = 'webhook_id_example'; // string | Webhook Id

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

Parameters

Name Type Description Notes
webhook_id string Webhook Id

Return type

\Yousign\Client\Model\WebhookSubscription

Authorization

bearerAuth

HTTP request headers

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

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

patchWebhooksWebhookId()

patchWebhooksWebhookId($webhook_id, $update_webhook_subscription): \Yousign\Client\Model\WebhookSubscription

Update a Webhook subscription

Updates a given Webhook subscription. Any parameters not provided are left unchanged.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WebhookApi(
    // 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
);
$webhook_id = 'webhook_id_example'; // string | Webhook Id
$update_webhook_subscription = new \Yousign\Client\Model\UpdateWebhookSubscription(); // \Yousign\Client\Model\UpdateWebhookSubscription

try {
    $result = $apiInstance->patchWebhooksWebhookId($webhook_id, $update_webhook_subscription);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WebhookApi->patchWebhooksWebhookId: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
webhook_id string Webhook Id
update_webhook_subscription \Yousign\Client\Model\UpdateWebhookSubscription [optional]

Return type

\Yousign\Client\Model\WebhookSubscription

Authorization

bearerAuth

HTTP request headers

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

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

postWebhooksSubscriptions()

postWebhooksSubscriptions($create_webhook_subscription): \Yousign\Client\Model\WebhookSubscription

Create a Webhook subscription

Creates a new Webhook subscription in your organization.

Example

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


// Configure Bearer authorization: bearerAuth
$config = Yousign\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yousign\Client\Api\WebhookApi(
    // 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
);
$create_webhook_subscription = new \Yousign\Client\Model\CreateWebhookSubscription(); // \Yousign\Client\Model\CreateWebhookSubscription

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

Parameters

Name Type Description Notes
create_webhook_subscription \Yousign\Client\Model\CreateWebhookSubscription [optional]

Return type

\Yousign\Client\Model\WebhookSubscription

Authorization

bearerAuth

HTTP request headers

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

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