Skip to content

Latest commit

 

History

History
308 lines (214 loc) · 9.75 KB

InventorystocktakingApi.md

File metadata and controls

308 lines (214 loc) · 9.75 KB

Tripletex\InventorystocktakingApi

All URIs are relative to https://tripletex.no/v2

Method HTTP request Description
delete DELETE /inventory/stocktaking/{id} [BETA] Delete stocktaking. Only available for some consumers.
get GET /inventory/stocktaking/{id} [BETA] Get stocktaking by ID. Only available for some consumers.
post POST /inventory/stocktaking [BETA] Create new stocktaking. Only available for some consumers.
put PUT /inventory/stocktaking/{id} [BETA] Update stocktaking. Only available for some consumers.
search GET /inventory/stocktaking [BETA] Find stocktaking corresponding with sent data. Only available for some consumers.

delete

delete($id)

[BETA] Delete stocktaking. Only available for some consumers.

Example

<?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\InventorystocktakingApi(
    // 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

try {
    $apiInstance->delete($id);
} catch (Exception $e) {
    echo 'Exception when calling InventorystocktakingApi->delete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Element ID

Return type

void (empty response body)

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

get

\Tripletex\Model\ResponseWrapperStocktaking get($id, $fields)

[BETA] Get stocktaking by ID. Only available for some consumers.

Example

<?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\InventorystocktakingApi(
    // 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 InventorystocktakingApi->get: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Element ID
fields string Fields filter pattern [optional]

Return type

\Tripletex\Model\ResponseWrapperStocktaking

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

post

\Tripletex\Model\ResponseWrapperStocktaking post($body)

[BETA] Create new stocktaking. Only available for some consumers.

Example

<?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\InventorystocktakingApi(
    // 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\Stocktaking(); // \Tripletex\Model\Stocktaking | 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 InventorystocktakingApi->post: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Tripletex\Model\Stocktaking JSON representing the new object to be created. Should not have ID and version set. [optional]

Return type

\Tripletex\Model\ResponseWrapperStocktaking

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

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

put

\Tripletex\Model\ResponseWrapperStocktaking put($id, $body)

[BETA] Update stocktaking. Only available for some consumers.

Example

<?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\InventorystocktakingApi(
    // 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\Stocktaking(); // \Tripletex\Model\Stocktaking | Partial object describing what should be updated

try {
    $result = $apiInstance->put($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventorystocktakingApi->put: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Element ID
body \Tripletex\Model\Stocktaking Partial object describing what should be updated [optional]

Return type

\Tripletex\Model\ResponseWrapperStocktaking

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

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

search

\Tripletex\Model\ListResponseStocktaking search($id, $is_completed, $inventory_id, $from, $count, $sorting, $fields)

[BETA] Find stocktaking corresponding with sent data. Only available for some consumers.

Example

<?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\InventorystocktakingApi(
    // 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
$is_completed = true; // bool | Equals
$inventory_id = 56; // int | Equals
$from = 0; // int | From index
$count = 1000; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern

try {
    $result = $apiInstance->search($id, $is_completed, $inventory_id, $from, $count, $sorting, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventorystocktakingApi->search: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string List of IDs [optional]
is_completed bool Equals [optional]
inventory_id int Equals [optional]
from int From index [optional] [default to 0]
count int Number of elements to return [optional] [default to 1000]
sorting string Sorting pattern [optional]
fields string Fields filter pattern [optional]

Return type

\Tripletex\Model\ListResponseStocktaking

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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