All URIs are relative to https://tripletex.no/v2
| Method | HTTP request | Description |
|---|---|---|
| downloadContent | GET /document/{id}/content | [BETA] Get content of document given by ID. |
| get | GET /document/{id} | [BETA] Get document by ID. |
string downloadContent($id)
[BETA] Get content of document given by ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\DocumentApi(
// 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 = 56; // int | ID of document to download content from.
try {
$result = $apiInstance->downloadContent($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DocumentApi->downloadContent: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID of document to download content from. |
string
- Content-Type: Not defined
- Accept: application/octet-stream
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperDocument get($id, $fields)
[BETA] Get document by ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\DocumentApi(
// 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 = 56; // int | Element ID
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->get($id, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DocumentApi->get: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Element ID | |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperDocument
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]