The Two-Layer Model
EveryBite uses a two-layer approach to personalization:Chain & API Key
App-level, staticIdentifies which restaurant chain’s menu data your app can access via the
Authorization API key header.Guest Preferences
User-level, dynamicThe individual guest’s dietary needs. Passed per-request as
preferences or loaded from their profile.Preference Types
Dietary Preferences (Diets)
What type of diet does the guest follow?| Diet | Description |
|---|---|
VEGAN | No animal products |
VEGETARIAN | No meat or fish (may include dairy/eggs) |
PESCATARIAN | Fish but no other meat |
Allergen Exclusions
What allergens must be avoided?| Allergen | Description |
|---|---|
DAIRY | Milk and milk products |
EGG | Eggs and egg products |
FISH | Fish |
SHELLFISH | Shrimp, crab, lobster, etc. |
TREE_NUT | Almonds, walnuts, cashews, etc. |
PEANUT | Peanuts and peanut products |
WHEAT | Wheat and gluten-containing ingredients |
SOY | Soybeans and soy products |
SESAME | Sesame seeds and sesame oil |
Nutrient Targets
What nutritional goals does the guest have?Session Tracking
Every API call can include anX-Session-ID header that enables analytics and personalization tracking. Sessions bind guest identity and behavioral context to every request; chain context comes from your API key, and restaurant context is provided via query arguments like restaurantId. See Sessions for details.
How session data is used depends on whether the user is anonymous or authenticated:
- Authenticated User
- Anonymous User
Sessions are directly tied to the known guest via authentication token. Complete history preserved.
Passing Preferences
Option 1: Per-Request (Anonymous Users)
Pass preferences directly with each query. For anonymous users, we track sessions and use behavioral patterns to build an inferred profile over time.Session intelligence: Even without authentication, we compile sessions from the same device/browser to understand preference patterns. A guest who consistently excludes dairy across multiple sessions may see dairy-free options surfaced more prominently.
Option 2: From Profile (Authenticated Users)
When you include a stable identifier likeguestId in startSession, preferences are loaded from the guest’s saved profile. All sessions are tied directly to this known user, enabling:
- Persistent preferences across devices
- Complete dining history
- Loyalty program integration
With GuestIQ, preferences are set once and work everywhere. A guest sets “I’m allergic to peanuts” in their profile, and it’s applied at every participating restaurant. All session data is associated with their verified identity.
Option 3: Combined (Profile + Overrides)
Start with saved preferences but add request-specific filters. The authenticated user’s session still tracks these temporary overrides for analytics.How Preferences Affect Results
When you pass preferences, two things happen:1. Filtering
Dishes that don’t meet criteria are filtered out or flagged:2. Match Status Calculation
Every dish gets amatchStatus based on how well it fits the preferences:
| Status | Meaning |
|---|---|
MATCH | Fully compatible with all preferences |
ALMOST_MATCH | Partial match with exceptions (e.g., removable ingredient) |
NOT_MATCH | Contains excluded allergens or is otherwise incompatible |
Building a Preferences UI
Use thefilterOptions query to build your preferences UI dynamically:
Example UI Pattern
Based on our SmartMenu implementation:
- Diet toggles - Buttons for Vegan, Vegetarian, etc.
- Allergen checkboxes - Multi-select for allergens to exclude
- Nutrient sliders - Range inputs for calories, protein, etc.
- Active filter chips - Show selected filters with remove buttons

