All URIs are relative to https://api.accounting.sage.com/v3.1, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
deleteProductsKey() | DELETE /products/{key} | Deletes a Product |
getProducts() | GET /products | Returns all Products |
getProductsKey() | GET /products/{key} | Returns a Product |
postProducts() | POST /products | Creates a Product |
putProductsKey() | PUT /products/{key} | Updates a Product |
deleteProductsKey($key)
Deletes a Product
Endpoint Availability * Accounting Plus: ๐จ๐ฆ, ๐ช๐ธ, ๐ซ๐ท, ๐ฌ๐ง, ๐ฎ๐ช, ๐บ๐ธ * Accounting Standard: ๐ฌ๐ง, ๐ฎ๐ช ### Access Control Restrictions Requires the authenticated user to have any mentioned role in one of the listed areas: * Area: Products & Services
: Full Access
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SynergiTech\Sage\Api\ProductsApi(
// 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()
);
$key = 'key_example'; // string | The Product Key.
try {
$apiInstance->deleteProductsKey($key);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->deleteProductsKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
key | string | The Product Key. |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProducts($search, $updatedOrCreatedSince, $deletedSince, $active, $itemsPerPage, $page, $attributes): \SynergiTech\Sage\Model\Product[]
Returns all Products
Endpoint Availability * Accounting Plus: ๐จ๐ฆ, ๐ช๐ธ, ๐ซ๐ท, ๐ฌ๐ง, ๐ฎ๐ช, ๐บ๐ธ * Accounting Standard: ๐ฌ๐ง, ๐ฎ๐ช * Accounting Start: ๐จ๐ฆ, ๐ช๐ธ, ๐ซ๐ท, ๐ฌ๐ง, ๐ฎ๐ช, ๐บ๐ธ ### Access Control Restrictions Requires the authenticated user to have any mentioned role in one of the listed areas: * Area: Products & Services
: Read Only, Restricted Access, Full Access * Area: Sales
: Read Only, Restricted Access, Full Access * Area: Purchases
: Read Only, Restricted Access, Full Access
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SynergiTech\Sage\Api\ProductsApi(
// 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()
);
$search = 'search_example'; // string | Use this to filter by the item code or description.
$updatedOrCreatedSince = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Use this to limit the response to Products changed since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Inclusive of the passed timestamp.
$deletedSince = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Use this to limit the response to Products deleted since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Not inclusive of the passed timestamp.
$active = True; // bool | Use this to only return active or inactive items
$itemsPerPage = 20; // int | Returns the given number of Products per request.
$page = 1; // int | Go to specific page of Products
$attributes = 'attributes_example'; // string | Specify the attributes that you want to expose for the Products (expose all attributes with 'all'). These are in addition to the base attributes (name, path)
try {
$result = $apiInstance->getProducts($search, $updatedOrCreatedSince, $deletedSince, $active, $itemsPerPage, $page, $attributes);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProducts: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
search | string | Use this to filter by the item code or description. | [optional] |
updatedOrCreatedSince | \DateTime | Use this to limit the response to Products changed since a given date (format: YYYY-MM-DDT(+ | -)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+ |
deletedSince | \DateTime | Use this to limit the response to Products deleted since a given date (format: YYYY-MM-DDT(+ | -)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+ |
active | bool | Use this to only return active or inactive items | [optional] |
itemsPerPage | int | Returns the given number of Products per request. | [optional] [default to 20] |
page | int | Go to specific page of Products | [optional] [default to 1] |
attributes | string | Specify the attributes that you want to expose for the Products (expose all attributes with 'all'). These are in addition to the base attributes (name, path) | [optional] |
\SynergiTech\Sage\Model\Product[]
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductsKey($key, $attributes): \SynergiTech\Sage\Model\Product
Returns a Product
Endpoint Availability * Accounting Plus: ๐จ๐ฆ, ๐ช๐ธ, ๐ซ๐ท, ๐ฌ๐ง, ๐ฎ๐ช, ๐บ๐ธ * Accounting Standard: ๐ฌ๐ง, ๐ฎ๐ช * Accounting Start: ๐จ๐ฆ, ๐ช๐ธ, ๐ซ๐ท, ๐ฌ๐ง, ๐ฎ๐ช, ๐บ๐ธ ### Access Control Restrictions Requires the authenticated user to have any mentioned role in one of the listed areas: * Area: Products & Services
: Read Only, Restricted Access, Full Access * Area: Sales
: Read Only, Restricted Access, Full Access * Area: Purchases
: Read Only, Restricted Access, Full Access
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SynergiTech\Sage\Api\ProductsApi(
// 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()
);
$key = 'key_example'; // string | The Product Key.
$attributes = 'attributes_example'; // string | Specify the attributes that you want to expose for the Product (expose all attributes with 'all'). These are in addition to the base attributes (name, path)
try {
$result = $apiInstance->getProductsKey($key, $attributes);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->getProductsKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
key | string | The Product Key. | |
attributes | string | Specify the attributes that you want to expose for the Product (expose all attributes with 'all'). These are in addition to the base attributes (name, path) | [optional] |
\SynergiTech\Sage\Model\Product
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
postProducts($products): \SynergiTech\Sage\Model\Product
Creates a Product
Endpoint Availability * Accounting Plus: ๐จ๐ฆ, ๐ช๐ธ, ๐ซ๐ท, ๐ฌ๐ง, ๐ฎ๐ช, ๐บ๐ธ * Accounting Standard: ๐ฌ๐ง, ๐ฎ๐ช ### Access Control Restrictions Requires the authenticated user to have any mentioned role in one of the listed areas: * Area: Products & Services
: Restricted Access, Full Access
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SynergiTech\Sage\Api\ProductsApi(
// 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()
);
$products = new \SynergiTech\Sage\Model\PostProducts(); // \SynergiTech\Sage\Model\PostProducts
try {
$result = $apiInstance->postProducts($products);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->postProducts: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
products | \SynergiTech\Sage\Model\PostProducts |
\SynergiTech\Sage\Model\Product
No authorization required
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
putProductsKey($key, $products): \SynergiTech\Sage\Model\Product
Updates a Product
Endpoint Availability * Accounting Plus: ๐จ๐ฆ, ๐ช๐ธ, ๐ซ๐ท, ๐ฌ๐ง, ๐ฎ๐ช, ๐บ๐ธ * Accounting Standard: ๐ฌ๐ง, ๐ฎ๐ช ### Access Control Restrictions Requires the authenticated user to have any mentioned role in one of the listed areas: * Area: Products & Services
: Restricted Access, Full Access
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new SynergiTech\Sage\Api\ProductsApi(
// 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()
);
$key = 'key_example'; // string | The Product Key.
$products = new \SynergiTech\Sage\Model\PutProducts(); // \SynergiTech\Sage\Model\PutProducts
try {
$result = $apiInstance->putProductsKey($key, $products);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->putProductsKey: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
key | string | The Product Key. | |
products | \SynergiTech\Sage\Model\PutProducts |
\SynergiTech\Sage\Model\Product
No authorization required
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]