Menu Pull API
This document describes the API endpoint for pulling menus from OneTablet.
Overview
While OneTablet typically pushes menu updates to your platform via webhooks, you can also pull menus on demand. This is useful for:
- Initial menu sync during onboarding
- Recovering from missed push updates
- Verifying menu state
- Debugging menu issues
Endpoint Details
The pull endpoint URL and authentication credentials are provided during integration setup.
Get Store Menus
Retrieve all menus for a specific store.
Endpoint: GET /pull/menus/{store_external_id}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
store_external_id | string | The store's external ID (merchant_supplied_id) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string | No | Comma-separated menu IDs to filter (optional) |
Example Request
# Get all menus for a store
curl -X GET "https://integration.onetablet.example/pull/menus/store-123" \
-H "x-api-key: your-api-key"
# Get specific menus
curl -X GET "https://integration.onetablet.example/pull/menus/store-123?ids=menu-001,menu-002" \
-H "x-api-key: your-api-key"
Response
{
"store": {
"merchant_supplied_id": "store-123",
"provider_type": "your_platform"
},
"menus": [
{
"id": "onetablet-menu-uuid",
"reference": "menu-reference",
"store": {
"merchant_supplied_id": "store-123",
"provider_type": "your_platform"
},
"open_hours": [
{
"day_index": "MON",
"start_time": "09:00:00",
"end_time": "21:00:00"
}
],
"special_hours": [],
"menu": {
"name": "Main Menu",
"subtitle": "Available all day",
"merchant_supplied_id": "main-menu-001",
"active": true,
"categories": [...]
}
}
]
}
See Menu Schema for the complete menu structure.
When to Use Pull vs Push
| Scenario | Recommended Approach |
|---|---|
| Normal operations | Push - Receive updates automatically |
| Initial onboarding | Pull - Fetch all menus to populate your system |
| After system outage | Pull - Sync any missed updates |
| Debugging issues | Pull - Verify current menu state |
| Real-time updates | Push - Don't poll frequently |
Rate Limits
Pull endpoints are intended for occasional use. Excessive polling may be rate-limited. For real-time updates, rely on push notifications.
Error Responses
| Status | Description |
|---|---|
200 OK | Success |
401 Unauthorized | Authentication failed |
404 Not Found | Store not found |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Server error |
Error Response Body
{
"error": "Not Found",
"message": "Store not found: store-123"
}