Skip to content

Latest commit

 

History

History
301 lines (202 loc) · 9.59 KB

ProductsApi.md

File metadata and controls

301 lines (202 loc) · 9.59 KB

OpenAPI\Client\ProductsApi

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.

productsGet

\OpenAPI\Client\Model\ProductResponse productsGet($current_page, $page_size, $authorization, $sort_by, $filter)

Get list all products.

Example

<?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;
}
?>

Parameters

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]

Return type

\OpenAPI\Client\Model\ProductResponse

Authorization

No authorization required

HTTP request headers

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

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

productsIdDelete

\OpenAPI\Client\Model\DeleteResponse productsIdDelete($authorization, $id)

Delete products.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
id string เลข Id Contact

Return type

\OpenAPI\Client\Model\DeleteResponse

Authorization

No authorization required

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

\OpenAPI\Client\Model\ProductResponse productsIdGet($authorization, $id)

Get products.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
authorization string เลข Id Product [default to 'Bearer accessToken']
id string

Return type

\OpenAPI\Client\Model\ProductResponse

Authorization

No authorization required

HTTP request headers

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

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

productsIdPut

\OpenAPI\Client\Model\ProductResponse productsIdPut($authorization, $id, $product_type)

Update products.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
authorization string เลข Id Product [default to 'Bearer accessToken']
id string
product_type \OpenAPI\Client\Model\ProductType

Return type

\OpenAPI\Client\Model\ProductResponse

Authorization

No authorization required

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

\OpenAPI\Client\Model\ProductResponse productsPost($authorization, $product_type)

Create products.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
authorization string [default to 'Bearer accessToken']
product_type \OpenAPI\Client\Model\ProductType

Return type

\OpenAPI\Client\Model\ProductResponse

Authorization

No authorization required

HTTP request headers

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

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