All URIs are relative to https://tripletex.no/v2
| Method | HTTP request | Description |
|---|---|---|
| get | GET /supplier/{id} | Get supplier by ID. |
| post | POST /supplier | Create supplier. Related supplier addresses may also be created. |
| postList | POST /supplier/list | [BETA] Create multiple suppliers. Related supplier addresses may also be created. |
| put | PUT /supplier/{id} | Update supplier. |
| putList | PUT /supplier/list | [BETA] Update multiple suppliers. Addresses can also be updated. |
| search | GET /supplier | Find suppliers corresponding with sent data. |
\Tripletex\Model\ResponseWrapperSupplier get($id, $fields)
Get supplier 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\SupplierApi(
// 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 SupplierApi->get: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Element ID | |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperSupplier
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperSupplier post($body)
Create supplier. Related supplier addresses may also be created.
<?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\SupplierApi(
// 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
);
$body = new \Tripletex\Model\Supplier(); // \Tripletex\Model\Supplier | JSON representing the new object to be created. Should not have ID and version set.
try {
$result = $apiInstance->post($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SupplierApi->post: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\Supplier | JSON representing the new object to be created. Should not have ID and version set. | [optional] |
\Tripletex\Model\ResponseWrapperSupplier
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseSupplier postList($body)
[BETA] Create multiple suppliers. Related supplier addresses may also be created.
<?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\SupplierApi(
// 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
);
$body = array(new \Tripletex\Model\Supplier()); // \Tripletex\Model\Supplier[] | JSON representing a list of new object to be created. Should not have ID and version set.
try {
$result = $apiInstance->postList($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SupplierApi->postList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\Supplier[] | JSON representing a list of new object to be created. Should not have ID and version set. | [optional] |
\Tripletex\Model\ListResponseSupplier
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperSupplier put($id, $body)
Update supplier.
<?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\SupplierApi(
// 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
$body = new \Tripletex\Model\Supplier(); // \Tripletex\Model\Supplier | Partial object describing what should be updated
try {
$result = $apiInstance->put($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SupplierApi->put: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Element ID | |
| body | \Tripletex\Model\Supplier | Partial object describing what should be updated | [optional] |
\Tripletex\Model\ResponseWrapperSupplier
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseSupplier putList($body)
[BETA] Update multiple suppliers. Addresses can also be updated.
<?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\SupplierApi(
// 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
);
$body = array(new \Tripletex\Model\Supplier()); // \Tripletex\Model\Supplier[] | JSON representing updates to object. Should have ID and version set.
try {
$result = $apiInstance->putList($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SupplierApi->putList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\Supplier[] | JSON representing updates to object. Should have ID and version set. | [optional] |
\Tripletex\Model\ListResponseSupplier
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseSupplier search($id, $supplier_number, $organization_number, $email, $invoice_email, $is_inactive, $account_manager_id, $changed_since, $is_wholesaler, $show_products, $from, $count, $sorting, $fields)
Find suppliers corresponding with sent data.
<?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\SupplierApi(
// 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 = "id_example"; // string | List of IDs
$supplier_number = "supplier_number_example"; // string | List of IDs
$organization_number = "organization_number_example"; // string | Equals
$email = "email_example"; // string | Equals
$invoice_email = "invoice_email_example"; // string | Equals
$is_inactive = true; // bool | Equals
$account_manager_id = "account_manager_id_example"; // string | List of IDs
$changed_since = "changed_since_example"; // string | Only return elements that have changed since this date and time
$is_wholesaler = true; // bool | Equals
$show_products = true; // bool | Equals
$from = 56; // int | From index
$count = 56; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->search($id, $supplier_number, $organization_number, $email, $invoice_email, $is_inactive, $account_manager_id, $changed_since, $is_wholesaler, $show_products, $from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SupplierApi->search: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | List of IDs | [optional] |
| supplier_number | string | List of IDs | [optional] |
| organization_number | string | Equals | [optional] |
| string | Equals | [optional] | |
| invoice_email | string | Equals | [optional] |
| is_inactive | bool | Equals | [optional] |
| account_manager_id | string | List of IDs | [optional] |
| changed_since | string | Only return elements that have changed since this date and time | [optional] |
| is_wholesaler | bool | Equals | [optional] |
| show_products | bool | Equals | [optional] |
| from | int | From index | [optional] |
| count | int | Number of elements to return | [optional] |
| sorting | string | Sorting pattern | [optional] |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ListResponseSupplier
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]