Skip to content

Latest commit

 

History

History
404 lines (305 loc) · 12.3 KB

ProductsApi.md

File metadata and controls

404 lines (305 loc) · 12.3 KB

Flowaccount.OpenAPITools.Api.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

ProductResponse ProductsGet (int currentPage, int pageSize, string authorization, string sortBy = null, string filter = null)

Get list all products.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class ProductsGetExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new ProductsApi(Configuration.Default);
            var currentPage = 56;  // int | Query current page products item. <br>Example Pattern: <ex>/products?currentPage=1 </ex><ex>/products?currentPage=1&pageSize=20</ex>
            var pageSize = 56;  // int | Query products list amount per page. <br>Example Pattern: <ex> /products?pageSize=20 </ex>
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var sortBy = sortBy_example;  // string | Query products list amount per page. <br>Example Pattern: <ex> /products?sortBy=[{'name':'productcode','sortOrder':'asc'}]</ex> (optional) 
            var filter = filter_example;  // string | Query products list amount per page. <br>Example Pattern: <ex> /products?filter=[{'columnName':'categoryId','columnValue':'517727','columnPredicateOperator':'And'}]</ex> (optional) 

            try
            {
                // Get list all products.
                ProductResponse result = apiInstance.ProductsGet(currentPage, pageSize, authorization, sortBy, filter);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ProductsApi.ProductsGet: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
currentPage int Query current page products item. <br>Example Pattern: <ex>/products?currentPage=1 </ex><ex>/products?currentPage=1&pageSize=20</ex>
pageSize int Query products list amount per page. <br>Example Pattern: <ex> /products?pageSize=20 </ex>
authorization string [default to "Bearer accessToken"]
sortBy string Query products list amount per page. <br>Example Pattern: <ex> /products?sortBy=[{'name':'productcode','sortOrder':'asc'}]</ex> [optional]
filter string Query products list amount per page. <br>Example Pattern: <ex> /products?filter=[{'columnName':'categoryId','columnValue':'517727','columnPredicateOperator':'And'}]</ex> [optional]

Return type

ProductResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

ProductsIdDelete

DeleteResponse ProductsIdDelete (string authorization, string id)

Delete products.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class ProductsIdDeleteExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new ProductsApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var id = id_example;  // string | เลข Id Contact

            try
            {
                // Delete products.
                DeleteResponse result = apiInstance.ProductsIdDelete(authorization, id);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ProductsApi.ProductsIdDelete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

DeleteResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

ProductsIdGet

ProductResponse ProductsIdGet (string authorization, string id)

Get products.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class ProductsIdGetExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new ProductsApi(Configuration.Default);
            var authorization = authorization_example;  // string | เลข Id Product (default to "Bearer accessToken")
            var id = id_example;  // string | 

            try
            {
                // Get products.
                ProductResponse result = apiInstance.ProductsIdGet(authorization, id);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ProductsApi.ProductsIdGet: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

ProductResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

ProductsIdPut

ProductResponse ProductsIdPut (string authorization, string id)

Update products.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class ProductsIdPutExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new ProductsApi(Configuration.Default);
            var authorization = authorization_example;  // string | เลข Id Product (default to "Bearer accessToken")
            var id = id_example;  // string | 

            try
            {
                // Update products.
                ProductResponse result = apiInstance.ProductsIdPut(authorization, id);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ProductsApi.ProductsIdPut: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

ProductResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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

ProductsPost

ProductResponse ProductsPost (string authorization, Product product)

Create products.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;

namespace Example
{
    public class ProductsPostExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
            var apiInstance = new ProductsApi(Configuration.Default);
            var authorization = authorization_example;  // string |  (default to "Bearer accessToken")
            var product = new Product(); // Product | 

            try
            {
                // Create products.
                ProductResponse result = apiInstance.ProductsPost(authorization, product);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ProductsApi.ProductsPost: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authorization string [default to "Bearer accessToken"]
product Product

Return type

ProductResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 200 response -
401 401 response -
500 500 response -

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