API Access
Developer documentation for integrating with Atlee.
Overview
The Atlee API enables programmatic access to your restaurant’s menu data, allergen information, and analytics.
Base URL: https://api.atlee.app/v1
Authentication
API Keys
All requests require authentication via API key.
Getting an API Key:
- Navigate to Settings > API
- Click Generate API Key
- Copy and securely store the key
- Key shown only once
Using the Key:
Authorization: Bearer YOUR_API_KEYKey Permissions
API keys inherit the permissions of the user who created them:
- Owner keys: Full access
- Member keys: Limited to their permissions
Key Management
- View active keys in Settings
- Revoke keys that are compromised
- Rotate keys periodically (recommended)
Rate Limits
| Plan | Requests/Minute | Requests/Day |
|---|---|---|
| Basic | 60 | 1,000 |
| Professional | 300 | 10,000 |
| Enterprise | Custom | Custom |
Rate Limit Headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1609459200Endpoints
Menu Items
List Items
GET /restaurants/{restaurant_id}/itemsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by status (published, draft) |
| limit | int | Max items to return (default 100) |
| offset | int | Pagination offset |
Response:
{
"items": [
{
"id": "uuid",
"name": "Signature Burger",
"description": "Half-pound beef patty",
"price_cents": 1299,
"status": "published",
"allergens": {
"milk": "contains",
"wheat": "contains",
"peanuts": "safe"
}
}
],
"total": 45,
"limit": 100,
"offset": 0
}Get Item
GET /restaurants/{restaurant_id}/items/{item_id}Create Item
POST /restaurants/{restaurant_id}/itemsRequest Body:
{
"name": "New Item",
"description": "Description here",
"price_cents": 999,
"status": "draft"
}Update Item
PATCH /restaurants/{restaurant_id}/items/{item_id}Delete Item
DELETE /restaurants/{restaurant_id}/items/{item_id}Allergens
Get Item Allergens
GET /restaurants/{restaurant_id}/items/{item_id}/allergensResponse:
{
"allergens": {
"milk": "contains",
"eggs": "unconfirmed",
"wheat": "safe"
}
}Update Item Allergens
PATCH /restaurants/{restaurant_id}/items/{item_id}/allergensRequest Body:
{
"milk": "contains",
"wheat": "safe"
}Menus
List Menus
GET /restaurants/{restaurant_id}/menusGet Menu with Items
GET /restaurants/{restaurant_id}/menus/{menu_id}?include=itemsAnalytics
Get Overview
GET /restaurants/{restaurant_id}/analytics/overviewQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
| start_date | date | Start of period (YYYY-MM-DD) |
| end_date | date | End of period (YYYY-MM-DD) |
Response:
{
"period": {
"start": "2024-01-01",
"end": "2024-01-31"
},
"metrics": {
"menu_views": 1234,
"unique_visitors": 890,
"qr_scans": 567,
"filter_usage_rate": 0.32
}
}Webhooks
Available Events
| Event | Description |
|---|---|
item.created | New item created |
item.updated | Item modified |
item.deleted | Item deleted |
allergen.updated | Allergen status changed |
flag.created | Community flag submitted |
review.created | New review submitted |
Configuring Webhooks
- Navigate to Settings > API > Webhooks
- Click Add Webhook
- Enter endpoint URL
- Select events to receive
- Save
Webhook Payload
{
"event": "item.updated",
"timestamp": "2024-01-15T12:00:00Z",
"restaurant_id": "uuid",
"data": {
"item_id": "uuid",
"changes": {
"name": {
"old": "Old Name",
"new": "New Name"
}
}
}
}Webhook Security
Verify webhook authenticity:
X-Atlee-Signature: sha256=abc123...Compute HMAC-SHA256 of request body with your webhook secret.
Error Handling
Error Format
{
"error": {
"code": "INVALID_REQUEST",
"message": "Item name is required",
"details": {
"field": "name"
}
}
}Error Codes
| Code | HTTP Status | Description |
|---|---|---|
| UNAUTHORIZED | 401 | Invalid or missing API key |
| FORBIDDEN | 403 | Insufficient permissions |
| NOT_FOUND | 404 | Resource not found |
| RATE_LIMITED | 429 | Too many requests |
| INVALID_REQUEST | 400 | Malformed request |
| SERVER_ERROR | 500 | Internal error |
SDKs
Official SDKs available:
- JavaScript/Node.js:
npm install @atlee/api - Python:
pip install atlee-api - Ruby:
gem install atlee
JavaScript Example
import { AtleeClient } from '@atlee/api';
const client = new AtleeClient({
apiKey: 'YOUR_API_KEY'
});
const items = await client.items.list({
restaurantId: 'uuid',
status: 'published'
});Support
For API support:
- Documentation: docs.atlee.app/api
- Email: developers@atlee.app
- Status: status.atlee.app
Last updated on