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).
Loading sandbox…
