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โ€ฆ