API Usage & Limits
Learn about API rate limits, monitoring usage, billing, and troubleshooting common issues.
Monitoring API Usage
Usage Dashboard
Track API activity in real-time:
Key Metrics:
- Total requests (today/week/month)
- Success rate
- Error rate
- Average response time
- Bandwidth used

Performance Charts:
- Requests over time
- Endpoint popularity
- Error types distribution
- Response time trends
- Traffic patterns
Request Logs
Detailed request history:
- Timestamp
- Endpoint called
- HTTP method
- Status code
- Response time
- IP address
- User agent
- Request size
- Response size

Filtering Options:
- By date range
- By endpoint
- By status (success/error)
- By API key
- By response time
- By IP address
Error Tracking
Monitor and resolve errors:
Common Error Codes:
- 401: Authentication failed (invalid key)
- 403: Forbidden (insufficient permissions)
- 404: Endpoint or resource not found
- 422: Validation error (invalid parameters)
- 429: Rate limit exceeded
- 500: Server error
- 503: Service unavailable

Error Details Include:
- Error message
- Request parameters
- Stack trace (when available)
- Suggested resolution
- Related documentation
Performance Analytics
Track Performance:
- Average response time
- 95th percentile response time
- Slowest endpoints
- Peak usage times
- Geographic latency
- Error rates by endpoint

Rate Limits & Quotas
Standard Limits
Default Rate Limits:
- Per minute: 100 requests
- Per hour: 5,000 requests
- Per day: 10,000 requests
- Per month: 100,000 requests
Burst Allowance:
- Brief spikes allowed
- Token bucket algorithm
- Average maintained over time
- Graceful degradation

Rate Limit Headers
Response Headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1678195200
Use These Headers:
- Track remaining quota
- Know when limit resets
- Implement smart throttling
- Prevent hitting limits
Exceeding Limits
When You Exceed:
- 429 status code returned
Retry-Afterheader provided- Request may be queued
- Automatic backoff suggested

Example Response:
{
"error": "rate_limit_exceeded",
"message": "Too many requests",
"retry_after": 60,
"limit": 100,
"window": "minute"
}
Implementing Backoff
Exponential Backoff:
async function makeRequestWithRetry(url, options, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const response = await fetch(url, options);
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After') || (i + 1) * 2;
console.log(`Rate limited. Retrying after ${retryAfter}s`);
await sleep(retryAfter * 1000);
continue;
}
return response;
} catch (error) {
if (i === maxRetries - 1) throw error;
await sleep((i + 1) * 1000);
}
}
}
Increasing Limits
Request Higher Limits:
- Contact support
- Provide use case details
- Expected traffic volume
- Traffic patterns
- Business justification
Information Needed:
- Current usage patterns
- Expected growth
- Peak traffic times
- Integration details
- Business impact

Enterprise Plans:
- Custom rate limits
- Dedicated resources
- Priority support
- SLA guarantees
- Higher quotas
Alerts & Notifications
Alert Configuration
Set up alerts for:
Usage Alerts:
- Approaching rate limit (80%)
- Rate limit exceeded
- Quota almost exhausted
- Unusual traffic spike
Error Alerts:
- Error rate exceeds threshold (10%)
- Specific error types
- Multiple failed authentications
- Service degradation
Performance Alerts:
- Slow response times
- Timeout increases
- Latency spikes

Notification Methods
Delivery Options:
- SMS (critical only)
- Push notification
- Webhook
- Slack/Teams integration
- PagerDuty integration
Alert Severity:
- Info: General notifications
- Warning: Approaching thresholds
- Error: Issues requiring attention
- Critical: Immediate action needed
API Billing & Costs
Pricing Model
Standard Tier (Included):
- All API features
- Standard rate limits
- Test environment unlimited
- Documentation and support
- No additional cost

What's Included:
- Venue endpoints
- Availability checks
- Reservation management
- Webhook notifications
- Standard monitoring
- Email support
Additional Costs
Optional Upgrades:
- Higher rate limits
- Dedicated resources
- Premium support
- Custom integrations
- SLA guarantees
- Advanced analytics
Enterprise Pricing:
- Contact sales for quote
- Custom rate limits
- Volume discounts
- Multi-venue pricing
- Annual contracts
Usage Tracking
Monitor costs:
- Requests used vs. allowance
- Projected monthly total
- Cost per request (enterprise)
- Overage charges (if applicable)
- Billing forecast

Troubleshooting
Authentication Errors
401 Unauthorized:
Causes:
- Invalid API key
- Expired key
- Revoked key
- Missing Authorization header
Solutions:
- Verify API key is correct
- Check key not revoked
- Correct header format:
Bearer {key} - Ensure key has necessary permissions

Check Your Request:
curl -H "Authorization: Bearer gat_live_..." \
https://api.grabatable.app/v1/venues/123
Rate Limiting Issues
429 Too Many Requests:
Solutions:
- Implement exponential backoff
- Cache responses where possible
- Batch requests together
- Review usage patterns
- Request limit increase
- Optimize API calls
Best Practices:
// Cache availability for 5 minutes
const cache = new Map();
async function getAvailability(date) {
const cacheKey = `availability-${date}`;
if (cache.has(cacheKey)) {
const cached = cache.get(cacheKey);
if (Date.now() - cached.time < 300000) {
return cached.data;
}
}
const data = await fetchAvailability(date);
cache.set(cacheKey, { data, time: Date.now() });
return data;
}
Connection Issues
Timeout or No Response:
Check:
- Internet connectivity
- API endpoint URL
- Firewall rules
- DNS resolution
- SSL certificate validity
- Grab A Table status page
Test with cURL:
curl -v https://api.grabatable.app/v1/health
Invalid Requests
400 Bad Request / 422 Validation Error:
Common Issues:
- Missing required parameters
- Invalid parameter format
- Wrong data types
- Invalid date/time format
- Party size out of range
Solution:
- Review API documentation
- Validate input data
- Check parameter types
- Use testing console
- Review error message details

Server Errors
500 Internal Server Error:
What to Do:
- Retry request (may be transient)
- Check status page
- Review recent changes
- Contact support if persists
- Provide request details
503 Service Unavailable:
- Planned maintenance (check announcements)
- Temporary outage
- Retry with backoff
- Subscribe to status updates
Best Practices
Performance Optimization
Do:
- ✓ Cache responses appropriately
- ✓ Batch requests when possible
- ✓ Use webhooks instead of polling
- ✓ Implement pagination
- ✓ Compress request/response
- ✓ Use conditional requests (ETag)
- ✓ Minimize payload size
Don't:
- ✗ Poll excessively for updates
- ✗ Request unnecessary data
- ✗ Ignore rate limits
- ✗ Make redundant API calls
- ✗ Store stale data too long
- ✗ Fetch all data at once
- ✗ Skip error handling

Caching Strategy
What to Cache:
- Venue information (1 hour)
- Availability (5-15 minutes)
- Static content (1 day)
- Configuration (until changed)
What Not to Cache:
- Reservation confirmations
- Real-time availability checks
- User-specific data
- Time-sensitive operations
Error Handling
Robust Error Handling:
async function createReservation(data) {
try {
const response = await fetch(API_URL, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.message || 'Request failed');
}
return await response.json();
} catch (error) {
// Log error for debugging
console.error('Reservation failed:', error);
// Show user-friendly message
if (error.message.includes('rate_limit')) {
return { error: 'Too many requests, please try again shortly' };
}
if (error.message.includes('unavailable')) {
return { error: 'This time slot is no longer available' };
}
return { error: 'Booking failed, please try again' };
}
}
Development Workflow
Recommended Process:
- Use Test Keys: Develop with sandbox
- Test Thoroughly: Cover edge cases
- Monitor Usage: Track API calls during development
- Handle Errors: Implement comprehensive error handling
- Implement Retry: With exponential backoff
- Cache Wisely: Balance freshness vs. performance
- Document: Internal API usage documentation
- Deploy Gradually: Phased rollout
- Monitor Production: Active monitoring post-launch
- Have Fallback: Manual process if API unavailable
Maintenance
Regular Tasks:
- Weekly: Review error logs
- Monthly: Analyze usage patterns
- Quarterly: Review and optimize
- Annually: Comprehensive audit
API Status & Health
Status Page
Check API health:
- Current status
- Incident history
- Scheduled maintenance
- Performance metrics
- Subscribe to updates
Status Page: status.grabatable.app

Health Endpoint
Check API Availability:
GET https://api.grabatable.app/v1/health
Response:
{
"status": "operational",
"timestamp": "2026-03-07T10:30:00Z",
"version": "v1",
"services": {
"api": "operational",
"database": "operational",
"webhooks": "operational"
}
}
Next Steps
- Review API keys management
- Configure API security
- Set up webhooks
- Read API reference documentation
Need Help?
If you have questions about API usage or limits, contact our support team at [email protected] or via WhatsApp.
API Support Includes:
- Integration assistance
- Troubleshooting help
- Performance optimization
- Limit increase requests
- Best practice guidance