Official WooSignal Shopify package
Build apps for Shopify easier with our new package. Free to get started, see the simple examples below.
In your flutter project add the dependency:
dependencies:
...
woosignal_shopify_api: ^2.2.4Import woosignal_shopify_api.dart
import 'package:shopify_woosignal/woosignal_shopify_api.dart';import 'woosignal_shopify_api/woosignal_shopify_api.dart';
...
// EXAMPLE GET PRODUCT
_getProducts() async {
// Step 1 - Initialize WooSignal
await WooSignalShopify.instance.init(appKey: "your app key");
// Step 2 - Call an API
ShopifyProductResponse? shopifyProductResponse = await WooSignalShopify.instance.getProducts();
print(shopifyProductResponse?.products?[0].name); // prints a product name
});
}Below is a comprehensive list of available methods grouped by their functionality.
Validates if items in the cart are in stock.
- Parameters: List of cart items
- Returns: List of validated cart items
- Method: POST
Fetches products with pagination support.
- Parameters:
first: Number of products to fetchafter: Cursor for paginationstatus: Product status (active, archived, draft)
- Returns:
ShopifyProductResponse - Method: POST
Fetches products using REST API with extensive filtering options.
- Parameters:
limit: Maximum number of productsproductType: Filter by product typecollectionId: Filter by collection- Various date filters and other parameters
- Returns: List of
Product - Method: POST
Fetches a single product by ID.
- Parameters:
productId: Product identifierfields: Specific fields to retrieve
- Returns:
Product - Method: POST
Gets the total count of products with filtering options.
- Parameters: Various filters including product type, collection ID, date ranges
- Returns:
CountResponse - Method: POST
Searches for products.
- Parameters:
query: Search termfirst: Number of resultsafter: Pagination cursor
- Returns:
ShopifyProductSearch - Method: POST
Fetches collections by their IDs.
- Parameters: List of collection IDs
- Returns:
CollectionItem - Method: POST
Retrieves products within a specific collection.
- Parameters:
id: Collection IDfirst: Number of productsafter: Pagination cursor
- Returns:
ProductsByCollectionIdResponse - Method: POST
Authenticates a customer.
- Parameters:
email: Customer emailpassword: Customer passwordloginUser: Whether to automatically log in
- Returns:
AuthCustomer - Method: POST
Registers a new customer.
- Parameters:
email: Customer emailpassword: Customer passwordfirstName: Customer first namelastName: Customer last nameacceptsMarketing: Marketing preferences
- Returns:
AuthCustomer - Method: POST
Initiates password reset process.
- Parameters: Customer email
- Returns: Boolean indicating success
- Method: POST
Retrieves customer details.
- Parameters: Customer access token
- Returns:
AuthCustomerInfo - Method: GET
Updates customer information.
- Parameters: Access token and updated fields
- Returns:
AuthCustomerUpdateResponse - Method: PUT
Updates customer shipping address.
- Parameters: Address details including street, city, country, etc.
- Returns:
AuthCustomerAddressUpdated - Method: PUT
Creates a new order.
- Parameters: Order details
- Returns:
OrderCreatedResponse - Method: POST
Retrieves order details.
- Parameters: Order ID
- Returns:
OrderResponse - Method: GET
Fetches customer's order history.
- Parameters:
customerAccessToken: Customer access tokenperPage: Results per pageafter: Pagination cursor
- Returns:
AuthCustomerOrder - Method: GET
Retrieves shop details.
- Parameters: Specific fields to retrieve
- Returns:
ShopResponse - Method: POST
Fetches shop policies.
- Parameters: Specific fields to retrieve
- Returns:
PoliciesResponse - Method: POST
Verifies if the app can process orders.
- Returns: Boolean
- Method: POST
Retrieves available shipping zones.
- Returns:
ShopifyShippingZone - Method: GET
Fetches detailed shipping zone information.
- Parameters: Specific fields to retrieve
- Returns:
ShippingZonesResponse - Method: POST
Retrieves provinces/states for a country.
- Parameters:
id: Country IDfields: Specific fields to retrieve
- Returns:
ProvincesResponse - Method: POST
Validates a discount code.
- Parameters: Discount code
- Returns:
DiscountCode - Method: GET
Retrieves price rule details.
- Parameters: Price rule ID
- Returns:
PriceRuleResponse - Method: POST
Disclaimer: This plugin is not affiliated with or supported by Shopify. All logos and trademarks are the property of their respective owners.