This endpoint is used for fetching related data that is useful to include in the product, such as reviews, ratings, categories, or any other related entities.The includes
parameter is an optional part of the FetchProductsQueryParams
interface. It allows you to list related data that should be included in the response when fetching products. This way, you can get more detailed information in one request, without making multiple API calls.The fetchOptions endpoint has been implemented in the fetch product endpoint, and It's all set up to save developer's time and effort. Payload#
Response#
fetchOptions.product.success
Usage#
Define an array, productIds
, and pass the product IDs. Then, call the salla.product.api.fetchOptions
method from and pass in the productIds
array. The method returns a promise, and the result, stored in productOptions
, contains the options for the specified products.📝 You can use the "fetch()"
API with the "includes"
query parameter to fetch a list of product options
Events#
This endpoint may trigger two events, the onProductOptionsFetched and onProductOptionsNotFetched events.onProductOptionsFetched#
This event is triggered when the action of fetching product options is done without having any errors coming back from the backend.onProductOptionsNotFetched#
This event is triggered when the action of fetching product options is not completed and an error has occurred. 
扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

扫码加入交流群Modified at 2025-02-20 07:53:20