Skip to content

Latest commit

 

History

History
511 lines (375 loc) · 17.9 KB

File metadata and controls

511 lines (375 loc) · 17.9 KB

VereTech\SyncroMSP_PHPclient\Client\ProductApi

All URIs are relative to https://{subdomain}.syncromsp.com/api/v1

Method HTTP request Description
productsBarcodeGet GET /products/barcode Returns a Product by Barcode
productsCategoriesGet GET /products/categories Returns a paginated list of Product Categories
productsGet GET /products Returns a paginated list of Products
productsIdAddImagesPost POST /products/{id}/add_images Creates a Product Image
productsIdDeleteImageDelete DELETE /products/{id}/delete_image Deletes a Product Image
productsIdGet GET /products/{id} Retrieves a Product by ID
productsIdLocationQuantitiesPut PUT /products/{id}/location_quantities Updates a Location Quantity
productsIdPut PUT /products/{id} Updates an existing Product by ID
productsPost POST /products Creates a Product

productsBarcodeGet

productsBarcodeGet($barcode)

Returns a Product by Barcode

Required permission: Products - List/Search

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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
);
$barcode = "barcode_example"; // string | Product Barcode string

try {
    $apiInstance->productsBarcodeGet($barcode);
} catch (Exception $e) {
    echo 'Exception when calling ProductApi->productsBarcodeGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
barcode string Product Barcode string [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

productsCategoriesGet

productsCategoriesGet()

Returns a paginated list of Product Categories

Required permission: Products - List/Search

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

productsGet

productsGet($sort, $sku, $name, $upc_code, $category_id, $id, $id_not, $query, $page)

Returns a paginated list of Products

Required permission: Products - List/Search

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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
);
$sort = "sort_example"; // string | A Product field to order by. Example \"name ASC\".
$sku = "sku_example"; // string | Returns Products with the SKU.
$name = "name_example"; // string | Returns Products with the name.
$upc_code = "upc_code_example"; // string | Returns Products with the UPC Code.
$category_id = 56; // int | Returns Products from the Category.
$id = array(56); // int[] | Any product with ID included in the list.
$id_not = array(56); // int[] | Any product with ID not included in the list.
$query = "query_example"; // string | Search query.
$page = 56; // int | Returns provided page of results, each 'page' contains 25 results.

try {
    $apiInstance->productsGet($sort, $sku, $name, $upc_code, $category_id, $id, $id_not, $query, $page);
} catch (Exception $e) {
    echo 'Exception when calling ProductApi->productsGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
sort string A Product field to order by. Example &quot;name ASC&quot;. [optional]
sku string Returns Products with the SKU. [optional]
name string Returns Products with the name. [optional]
upc_code string Returns Products with the UPC Code. [optional]
category_id int Returns Products from the Category. [optional]
id int[] Any product with ID included in the list. [optional]
id_not int[] Any product with ID not included in the list. [optional]
query string Search query. [optional]
page int Returns provided page of results, each 'page' contains 25 results. [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

productsIdAddImagesPost

productsIdAddImagesPost($id, $body)

Creates a Product Image

Required permission: Products - Edit

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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 | 
$body = new \stdClass; // object | 

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

Parameters

Name Type Description Notes
id int
body object [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

productsIdDeleteImageDelete

productsIdDeleteImageDelete($id, $photo_id)

Deletes a Product Image

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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 | 
$photo_id = 56; // int | 

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

Parameters

Name Type Description Notes
id int
photo_id int [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

productsIdGet

productsIdGet($id)

Retrieves a Product by ID

Required permission: Products - List/Search

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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 | 

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

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

productsIdLocationQuantitiesPut

productsIdLocationQuantitiesPut($id, $body)

Updates a Location Quantity

Required permission: Products - Edit Quantities

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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 | 
$body = new \VereTech\SyncroMSP_PHPclient\Client\Model\IdLocationQuantitiesBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\IdLocationQuantitiesBody | 

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

Parameters

Name Type Description Notes
id int
body \VereTech\SyncroMSP_PHPclient\Client\Model\IdLocationQuantitiesBody [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

productsIdPut

productsIdPut($id, $body)

Updates an existing Product by ID

Required permission: Products - Edit

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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 | 
$body = new \VereTech\SyncroMSP_PHPclient\Client\Model\ProductsIdBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\ProductsIdBody | Product object that needs to be updated

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

Parameters

Name Type Description Notes
id int
body \VereTech\SyncroMSP_PHPclient\Client\Model\ProductsIdBody Product object that needs to be updated [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

productsPost

productsPost($body)

Creates a Product

Required permission: Products - Create

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\ProductApi(
    // 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 \VereTech\SyncroMSP_PHPclient\Client\Model\ProductsBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\ProductsBody | Product object that needs to be added

try {
    $apiInstance->productsPost($body);
} catch (Exception $e) {
    echo 'Exception when calling ProductApi->productsPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \VereTech\SyncroMSP_PHPclient\Client\Model\ProductsBody Product object that needs to be added [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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