Introduction
The Reservations API is a RESTful API built with Go that provides a comprehensive booking and merchant management system. The API supports user authentication, merchant operations, booking management, and customer interactions.Base URL
All API requests should be made to:PORT environment variable. In production, this would be your domain:
Request Format
The API accepts JSON-encoded request bodies. Always include theContent-Type header:
Example Request
Response Format
All successful responses return data wrapped in adata object:
Success Response
The response payload containing the requested data
Error Response
Error responses include anerror object with a descriptive message:
HTTP Status Codes
The API uses standard HTTP status codes to indicate success or failure:| Status Code | Description |
|---|---|
200 | OK - Request succeeded |
201 | Created - Resource successfully created |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing authentication |
404 | Not Found - Resource doesn’t exist |
500 | Internal Server Error - Something went wrong on the server |
Common Error Scenarios
Validation Errors
When request validation fails, you’ll receive a400 status with details:
Authentication Errors
Missing or invalid authentication returns401:
Rate Limiting
Currently, the API does not enforce rate limiting. However, we recommend implementing client-side throttling to avoid overwhelming the server.API Versioning
The API is currently at version 1 (/api/v1). All endpoints are prefixed with this version identifier. Breaking changes will be introduced in new versions while maintaining backward compatibility for existing versions.
Environments
The API behavior can be configured using theAPP_ENV environment variable:
development- Development environment with debug loggingproduction- Production environment with optimized settings
Core Resources
The API provides access to the following core resources:- Authentication - User login, signup, and OAuth flows
- Bookings - Create, retrieve, and manage bookings
- Merchants - Merchant profiles, settings, and dashboard
- Customers - Customer management and history
- Services - Service catalog and categories
- Team - Team member management
- Locations - Business location management
- Products - Product catalog