How can I use the Treez API to identify products on store shelves and filter by location?
The Treez API provides tools to help you identify which products are on store shelves and filter inventory by location. This guide outlines the key steps and best practices for achieving accurate results.
Overview of Inventory Reporting in Treez API
The Treez API allows users to query inventory data to determine product availability and location. By using specific parameters and refining queries, you can identify products that are sellable and located on store shelves. This process involves leveraging API endpoints and understanding the data fields returned in the response.
Filtering Inventory by Location
To filter inventory by location, use the following approach:
Query the product_list endpoint with the parameter active=all. This ensures that both active and deactivated products are included in the response.
Include the parameter above_threshold=true to filter for products with sellable inventory above the display threshold.
Use the "Inventory Location" and "Location ID" fields returned in the API response to identify where the inventory is stored. Note that the API does not directly include store location information, so you must track the specific instance you are querying to segment by store.
Identifying On-Shelf Products
To accurately identify products that are on store shelves:
Include all active states in your query by setting active=all. This ensures that inventory assigned to deactivated SKUs is also captured.
Refine the results using product-level identifiers, such as Product ID, and apply store or location constraints to match the true on-shelf assortment.
Avoid relying solely on parameters like "sellable," "front of house," and "active," as these may still exclude items currently on the shelf.
Common Pitfalls and Best Practices
Pitfall: Assuming that "active" status alone reflects on-shelf products. - Solution: Always include active=all in your queries to capture all relevant inventory states.
Pitfall: Overlooking location-specific filtering. - Solution: Use the "Inventory Location" and "Location ID" fields to refine results by location.
Pitfall: Misinterpreting API response data. - Solution: Familiarize yourself with the API documentation to understand the meaning of each field and parameter.
Example Query
Here is an example of a query to identify on-shelf products at a specific location:
GET /product_list?active=all&above_threshold=true
Use the "Inventory Location" and "Location ID" fields in the response to filter by store location.
Refine the results further using product-level identifiers and store constraints.
By following these steps and best practices, you can effectively use the Treez API to identify products on store shelves and filter inventory by location.