Get attributes by marker
In this example, we demonstrate how to retrieve the attribute schema for a specific attribute set by its marker using the OneEntry API.
β
Purpose of the scenario:
- Connect to the OneEntry API
- Retrieve the attribute schema for a named attribute set
- Access attribute metadata: marker, type, label, validators, and listTitles
β
What you need:
- A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
- An attribute set configured in OneEntry with a known marker (e.g., "product")
π Important:
- 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).
- Returns SCHEMA of attributes β NOT the actual values of entities.
- value is always {} in schema β to get real values use Products.getProducts(), Pages.getPageByUrl(), etc.
- Use listTitles to build filter options for list and radioButton type attributes.
π See in documentation:
π¦ SDK reference:
Loading sandboxβ¦
