Get products by page URL
In this example, we demonstrate how to retrieve all products belonging to a specific catalog page using the OneEntry API.
β
Purpose of the scenario:
- Connect to the OneEntry API
- Retrieve products filtered by their catalog page URL
- Review the returned products list
β
What you need:
- A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
- A catalog page configured in OneEntry with a known URL (e.g., "products").
- Products assigned to that catalog page.
π Important:
- Returns `{ items, total }` β not a plain array.
- The url parameter must match the pageUrl of a catalog_page type page.
- 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β¦
