Get products by IDs
In this example, we demonstrate how to retrieve multiple products at once by passing a comma-separated list of product IDs using the OneEntry API.
โ
Purpose of the scenario:
- Connect to the OneEntry API
- Pass a comma-separated list of product IDs
- Retrieve the matched products and review the results
โ
What you need:
- A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
- Known product IDs that exist in your OneEntry project.
๐ Important:
- getProductsByIds returns a plain array IProductsEntity[], NOT `{ items, total }`.
- These examples do not include error handling.
- You can manage errors using a try-catch block or by employing a construction like await Promise.catch((error) => error).
๐ See in documentation:
๐ฆ SDK reference:
Loading sandboxโฆ
