All URIs are relative to https://openapi.flowaccount.com/v1
Method | HTTP request | Description |
---|---|---|
productsGet | GET /products | Get list all products. |
productsIdDelete | DELETE /products/{id} | Delete products. |
productsIdGet | GET /products/{id} | Get products. |
productsIdPut | PUT /products/{id} | Update products. |
productsPost | POST /products | Create products. |
\OpenAPI\Client\Model\ProductResponse productsGet($current_page, $page_size, $authorization, $sort_by, $filter)
Get list all products.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\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()
);
$current_page = 56; // int | Query current page products item. <br>Example Pattern: <ex>/products?currentPage=1 </ex><ex>/products?currentPage=1&pageSize=20</ex>
$page_size = 56; // int | Query products list amount per page. <br>Example Pattern: <ex> /products?pageSize=20 </ex>
$authorization = 'Bearer accessToken'; // string |
$sort_by = 'sort_by_example'; // string | Product Sort By Example Pattern: <ex> /products?sortBy=[{'name':'productCode','sortOrder':'asc'}]</ex>
$filter = 'filter_example'; // string | Product Filter Example Pattern: <br> name = Product Name <br> productCode = Product Code / SKU <br> barcode = Product Barcode <br> categoryId = Product Category<br> <ex> /products?filter=[{'columnName':'categoryId','columnValue':'517727','columnPredicateOperator':'And'}]</ex>
try {
$result = $apiInstance->productsGet($current_page, $page_size, $authorization, $sort_by, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->productsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
current_page | int | Query current page products item. <br>Example Pattern: <ex>/products?currentPage=1 </ex><ex>/products?currentPage=1&pageSize=20</ex> | |
page_size | int | Query products list amount per page. <br>Example Pattern: <ex> /products?pageSize=20 </ex> | |
authorization | string | [default to 'Bearer accessToken'] | |
sort_by | string | Product Sort By Example Pattern: <ex> /products?sortBy=[{'name':'productCode','sortOrder':'asc'}]</ex> | [optional] |
filter | string | Product Filter Example Pattern: <br> name = Product Name <br> productCode = Product Code / SKU <br> barcode = Product Barcode <br> categoryId = Product Category<br> <ex> /products?filter=[{'columnName':'categoryId','columnValue':'517727','columnPredicateOperator':'And'}]</ex> | [optional] |
\OpenAPI\Client\Model\ProductResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\DeleteResponse productsIdDelete($authorization, $id)
Delete products.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\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()
);
$authorization = 'Bearer accessToken'; // string |
$id = 'id_example'; // string | เลข Id Contact
try {
$result = $apiInstance->productsIdDelete($authorization, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->productsIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
id | string | เลข Id Contact |
\OpenAPI\Client\Model\DeleteResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\ProductResponse productsIdGet($authorization, $id)
Get products.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\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()
);
$authorization = 'Bearer accessToken'; // string | เลข Id Product
$id = 'id_example'; // string |
try {
$result = $apiInstance->productsIdGet($authorization, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->productsIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | เลข Id Product | [default to 'Bearer accessToken'] |
id | string |
\OpenAPI\Client\Model\ProductResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\ProductResponse productsIdPut($authorization, $id, $product_type)
Update products.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\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()
);
$authorization = 'Bearer accessToken'; // string | เลข Id Product
$id = 'id_example'; // string |
$product_type = new \OpenAPI\Client\Model\ProductType(); // \OpenAPI\Client\Model\ProductType |
try {
$result = $apiInstance->productsIdPut($authorization, $id, $product_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->productsIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | เลข Id Product | [default to 'Bearer accessToken'] |
id | string | ||
product_type | \OpenAPI\Client\Model\ProductType |
\OpenAPI\Client\Model\ProductResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\OpenAPI\Client\Model\ProductResponse productsPost($authorization, $product_type)
Create products.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\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()
);
$authorization = 'Bearer accessToken'; // string |
$product_type = new \OpenAPI\Client\Model\ProductType(); // \OpenAPI\Client\Model\ProductType |
try {
$result = $apiInstance->productsPost($authorization, $product_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->productsPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | [default to 'Bearer accessToken'] | |
product_type | \OpenAPI\Client\Model\ProductType |
\OpenAPI\Client\Model\ProductResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]