Skip to content

Latest commit

 

History

History
274 lines (194 loc) · 8.59 KB

LinksApi.md

File metadata and controls

274 lines (194 loc) · 8.59 KB

tpn\LinksApi

All URIs are relative to https://penapi.pacnetconnect.com

Method HTTP request Description
inventoryLink POST /1.0.0/inventory/link Create Link and initial Contract
inventoryLinks GET /1.0.0/inventory/links/{linkid} Get details of specified link
inventoryLinksCustomer GET /1.0.0/inventory/links/customer/{customeruuid} Get active Links
inventoryLinksHistory GET /1.0.0/inventory/links/history/{linkid} Get Link history
inventoryLinksStatsFlow GET /1.0.0/inventory/links-stats/flow/{linkid}/{startdate}/{enddate} Get statistics for flow

inventoryLink

SuccessFragment inventoryLink($createlinkrequest)

Create Link and initial Contract

Example

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

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

$apiInstance = new tpn\Api\LinksApi(
    // 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
);
$createlinkrequest = new \tpn\Model\Createlinkrequest(); // \tpn\Model\Createlinkrequest | 

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

Parameters

Name Type Description Notes
createlinkrequest \tpn\Model\Createlinkrequest [optional]

Return type

SuccessFragment

Authorization

oAuth2

HTTP request headers

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

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

inventoryLinks

\tpn\Model\InlineResponse2007 inventoryLinks($linkid)

Get details of specified link

Example

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

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

$apiInstance = new tpn\Api\LinksApi(
    // 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
);
$linkid = 'linkid_example'; // string | Unique identifier representing a specific link

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

Parameters

Name Type Description Notes
linkid string Unique identifier representing a specific link

Return type

\tpn\Model\InlineResponse2007

Authorization

oAuth2

HTTP request headers

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

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

inventoryLinksCustomer

\tpn\Model\Link[] inventoryLinksCustomer($customeruuid)

Get active Links

Example

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

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

$apiInstance = new tpn\Api\LinksApi(
    // 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
);
$customeruuid = 'customeruuid_example'; // string | Unique identifier representing a specific customer

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

Parameters

Name Type Description Notes
customeruuid string Unique identifier representing a specific customer

Return type

\tpn\Model\Link[]

Authorization

oAuth2

HTTP request headers

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

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

inventoryLinksHistory

\tpn\Model\InlineResponse2005 inventoryLinksHistory($linkid)

Get Link history

Example

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

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

$apiInstance = new tpn\Api\LinksApi(
    // 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
);
$linkid = 'linkid_example'; // string | Unique identifier representing a specific link

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

Parameters

Name Type Description Notes
linkid string Unique identifier representing a specific link

Return type

\tpn\Model\InlineResponse2005

Authorization

oAuth2

HTTP request headers

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

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

inventoryLinksStatsFlow

\tpn\Model\InlineResponse20019[] inventoryLinksStatsFlow($linkid, $startdate, $enddate)

Get statistics for flow

Get statistics related to the specified flow

Example

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

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

$apiInstance = new tpn\Api\LinksApi(
    // 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
);
$linkid = 'linkid_example'; // string | Unique identifier representing a specific link
$startdate = 'startdate_example'; // string | Start date for statistics query
$enddate = 'enddate_example'; // string | End date for statistics query

try {
    $result = $apiInstance->inventoryLinksStatsFlow($linkid, $startdate, $enddate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LinksApi->inventoryLinksStatsFlow: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
linkid string Unique identifier representing a specific link
startdate string Start date for statistics query
enddate string End date for statistics query

Return type

\tpn\Model\InlineResponse20019[]

Authorization

oAuth2

HTTP request headers

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

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