All URIs are relative to https://api.facestore.local/v1
| Method | HTTP request | Description |
|---|---|---|
| AddProduct | POST /products | |
| DeleteProductById | DELETE /products/{id}/ | |
| GetProductById | GET /products/{id}/ | |
| GetProducts | GET /products | |
| UpdateProductById | PUT /products/{id}/ | |
| UpdateProductById_0 | PATCH /products/{id}/ |
InlineResponse2014 AddProduct (Product product)
Creates a new product in the store.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class AddProductExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new ProductsApi();
var product = new Product(); // Product | Product to add to the store
try
{
InlineResponse2014 result = apiInstance.AddProduct(product);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProductsApi.AddProduct: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| product | Product | Product to add to the store |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteProductById (long? id)
deletes a single product based on the ID supplied
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class DeleteProductByIdExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new ProductsApi();
var id = 789; // long? | ID of product to delete
try
{
apiInstance.DeleteProductById(id);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProductsApi.DeleteProductById: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | long? | ID of product to delete |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2014 GetProductById (long? id, List includes, int? limit)
Returns a product based on a single ID ### Includes You can give the following values on includes parameter: brands, categories, routes, stocks
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class GetProductByIdExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new ProductsApi();
var id = 789; // long? | ID of product to fetch
var includes = new List<string>(); // List<string> | Include associated objects within response (optional)
var limit = 56; // int? | max records to return (optional)
try
{
InlineResponse2014 result = apiInstance.GetProductById(id, includes, limit);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProductsApi.GetProductById: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | long? | ID of product to fetch | |
| includes | List | Include associated objects within response | [optional] |
| limit | int? | max records to return | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2006 GetProducts (List includes, int? limit, List orderBy)
Returns all products from the system that the user has access to ### Includes You can give the following values on includes parameter: brands, categories, routes, stocks
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class GetProductsExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new ProductsApi();
var includes = new List<string>(); // List<string> | Include associated objects within response (optional)
var limit = 56; // int? | max records to return (optional)
var orderBy = new List<string>(); // List<string> | Specify the field to be sorted, examples: - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc` (optional)
try
{
InlineResponse2006 result = apiInstance.GetProducts(includes, limit, orderBy);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProductsApi.GetProducts: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| includes | List | Include associated objects within response | [optional] |
| limit | int? | max records to return | [optional] |
| orderBy | List | Specify the field to be sorted, examples: - `?order_by=id | desc` - `?order_by=updated_at |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateProductById (long? id, Product tax)
update a single product based on the ID supplied
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class UpdateProductByIdExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new ProductsApi();
var id = 789; // long? | ID of product to update
var tax = new Product(); // Product | Product to add to the store
try
{
apiInstance.UpdateProductById(id, tax);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProductsApi.UpdateProductById: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | long? | ID of product to update | |
| tax | Product | Product to add to the store |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateProductById_0 (long? id, Product tax)
update a single product based on the ID supplied
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class UpdateProductById_0Example
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new ProductsApi();
var id = 789; // long? | ID of product to update
var tax = new Product(); // Product | Product to add to the store
try
{
apiInstance.UpdateProductById_0(id, tax);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProductsApi.UpdateProductById_0: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | long? | ID of product to update | |
| tax | Product | Product to add to the store |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]