All URIs are relative to https://api.easybill.de/rest/v1
Method | HTTP request | Description |
---|---|---|
stocksGet | GET /stocks | Fetch a list of stock entries for positions |
stocksIdGet | GET /stocks/{id} | Fetch an stock entry for a position |
stocksPost | POST /stocks | Create a stock entry for a position |
\Swagger\Client\Model\Stocks stocksGet($limit, $page, $position_id, $document_id)
Fetch a list of stock entries for positions
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\StockApi(
// 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
);
$limit = 56; // int | Limited the result. Default is 100. Maximum can be 1000.
$page = 56; // int | Set current Page. Default is 1.
$position_id = "position_id_example"; // string | Filter stock entries by position id.
$document_id = "document_id_example"; // string | Filter stock entries by document id.
try {
$result = $apiInstance->stocksGet($limit, $page, $position_id, $document_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StockApi->stocksGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Limited the result. Default is 100. Maximum can be 1000. | [optional] |
page | int | Set current Page. Default is 1. | [optional] |
position_id | string | Filter stock entries by position id. | [optional] |
document_id | string | Filter stock entries by document id. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Stock stocksIdGet($id)
Fetch an stock entry for a position
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\StockApi(
// 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 = 789; // int | ID of the stock entry that needs to be fetched
try {
$result = $apiInstance->stocksIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StockApi->stocksIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of the stock entry that needs to be fetched |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Stock stocksPost($body)
Create a stock entry for a position
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');// Configure HTTP basic authorization: basicAuth
$config = Swagger\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Swagger\Client\Api\StockApi(
// 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 \Swagger\Client\Model\Stock(); // \Swagger\Client\Model\Stock |
try {
$result = $apiInstance->stocksPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StockApi->stocksPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\Stock |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]