The products API allows you to view individual or a batch of products.
Returns products back from WooCommerce, include parameters to query data.
int page,
int perPage,
String search,
String after,
String before,
String order,
String orderBy,
String slug,
String status,
String type,
String sku,
String category,
String tag,
String shippingClass,
String attribute,
String attributeTerm,
String taxClass,
String minPrice,
String maxPrice,
String stockStatus,
List<int> exclude,
List<int> parentExclude,
List<int> include,
List<int> parent,
int offset = 0,
bool featured,
bool onSale
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
List<Product> products = await WooSignal.instance.getProducts();
List<Product> instance
Represents the following object - WooCommerce list all products
Returns a product back from WooCommerce, include parameters to query data.
int id
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
Product product = await WooSignal.instance.retrieveProduct(id: "product id");
Product instance
Represents the following object - WooCommerce retrieve a product
This API helps you to batch create, update and delete multiple orders.
Map<String, dynamic> data
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
ProductBatch productBatch = await WooSignal.instance.batchProduct(data: "batch update data");
ProductBatch instance
Represents the following object - WooCommerce batch product
This API helps you delete a product.
int id,
{bool force = true}
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
Product product = await WooSignal.instance.deleteProduct(id: "product id");
Product instance
Represents the following object - WooCommerce product
This API lets you make changes to a product.
int id,
{Map<String, dynamic> data}
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
Product product = await WooSignal.instance.updateProduct(id: "product id");
Product instance
Represents the following object - WooCommerce product
This API helps you to create a new product.
required String name,
required String type, // simple, grouped, external and variable.
required String regularPrice,
required String description,
required String shortDescription,
required Map<String, dynamic> categories,
required Map<String, dynamic> images,
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
Product product = await WooSignal.instance.createProduct({
required String name,
required String type,
required String regularPrice,
required String description,
required String shortDescription,
required Map<String, dynamic> categories,
required Map<String, dynamic> images,
});
Product instance
Represents the following object - WooCommerce product