New Product Search and Product Category Endpoints

• Greg Bartnick

Last year we introduced a number of new product information endpoints to the Widen Collective® API v2.0. We’re now providing even more functionality to easily search your products and also organize them within your product category hierarchy.

You can now access the power of product search through the API. With the new endpoint, you can do the same searches you access via the Entries UI and more. Search with a simple query string to search by product name and SKU or add filters to unlock the full power of the search endpoint. Filters can be used to search only parent products or only variants. They can also be used to search by attribute values.

  • POST /v2/products/search
    • Search parameters that can be set in the request body are query, filters, expand, sort, limit, and offset.

Get the details about the product search endpoint in our API documentation.

Product Categories

Entries recently added the ability to organize your products into categories. This functionality is now available through the API. This affects a few endpoints.

  • GET /v2/product-categories
    • This is a new endpoint to list product categories. It accepts a parent category id to return subcategories of that parent. With a few calls, you can get your whole product hierarchy.
  • PUT /v2/products/<id>/product-category
    • This is a new endpoint to update the product category for a product
  • POST /v2/products
    • The request body of this endpoint now allows for setting the category at product creation
  • POST /v2/products/search
    • The products in the response will include their category information
  • GET /v2/products/<id>
    • The returned product will include category information
  • GET /v2/products/channel/<channelId>
    • The products in the response will include their category information

Details about these endpoints are available in our API documentation. Reach out to our support team if you have any questions.