Overview
The Pickleplus Tenant API enables businesses to integrate pickleball facility booking, e-commerce, and player management features into their own applications. The API uses a dual-authentication model: an API key identifies your business, and JWT tokens identify individual users.
Get Your API Key
Navigate to the Developers section in the admin panel to generate an API key for your business.
Set Up Authentication
Include your API key in the X-API-Key header of every request. For user-specific actions, also include a JWT Authorization: Bearer token.
Authenticate Users
Use the OTP endpoints to send and verify one-time passwords. A successful verification returns a JWT token for the user.
Start Building
Use the tenant endpoints to list facilities, create bookings, manage carts, process orders, and more.
Authentication
The API uses a dual-layer authentication system:
API Key Authentication Required for all requests
Every request must include your business API key in the X-API-Key header. This identifies your business and scopes all data to your facilities.
X-API-Key: pk_a1b2c3d4e5f6...
User JWT Authentication Required for user-specific endpoints
User-specific endpoints (bookings, cart, wallet, etc.) require a JWT token obtained through the OTP login flow. Include it in the Authorization header.
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Response Format
All responses follow a consistent format:
{
"code": 1, // 1 = success, 0 = error
"data": { ... }, // Response payload (on success)
"msg": "..." // Error message (on failure)
}
User Authentication
Authenticate users with OTP (one-time password) via email or phone.
Request Body
| Parameter | Type | Description |
|---|---|---|
| identifier | string | Email address or phone number required |
| identifierType | string | "email" or "phone" required |
Response
{ "code": 1, "msg": "OTP sent" }
Request Body
| Parameter | Type | Description |
|---|---|---|
| identifier | string | Same identifier used to send OTP required |
| identifierType | string | "email" or "phone" required |
| code | string | 6-digit OTP code required |
Response
{
"code": 1,
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": 123,
"email": "player@example.com",
"fullName": "Jane Doe"
}
}
}
User Profile
Response
{
"code": 1,
"data": {
"id": 123,
"email": "player@example.com",
"fullName": "Jane Doe",
"phone": "+65 9123 4567",
"skillLevel": "intermediate",
"preferredHand": "right"
}
}
Request Body
| Parameter | Type | Description |
|---|---|---|
| fullName | string | User's full name |
| phone | string | Phone number |
| skillLevel | string | beginner, intermediate, advanced, pro |
| preferredHand | string | left, right |
Business & Branding
Returns branding settings for your white-label app including colors, logos, and business info.
Response
{
"code": 1,
"data": {
"businessName": "Ace Pickleball Club",
"brandPrimaryColor": "#7C3AED",
"brandSecondaryColor": "#A78BFA",
"logoUrl": "https://...",
"tagline": "Play. Compete. Connect."
}
}
Facilities & Availability
Returns all facilities belonging to your business, including courts and operating hours.
Response
{
"code": 1,
"data": [
{
"id": 1,
"name": "Main Arena",
"address": "123 Pickleball Lane",
"courts": [
{ "id": 1, "name": "Court A", "type": "indoor" }
]
}
]
}
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| facilityId | number | Facility ID required |
| date | string | Date in YYYY-MM-DD format required |
| courtId | number | Filter by specific court |
Response
{
"code": 1,
"data": {
"facility": { "id": 1, "name": "Main Arena" },
"date": "2025-03-15",
"slots": [
{
"courtId": 1, "courtName": "Court A",
"time": "09:00", "endTime": "10:00",
"available": true, "price": "25.00"
}
]
}
}
Bookings
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter: upcoming, completed, cancelled |
URL Parameters
| Parameter | Type | Description |
|---|---|---|
| id | number | Booking ID required |
Request Body
| Parameter | Type | Description |
|---|---|---|
| courtId | number | Court to book required |
| facilityId | number | Facility ID required |
| date | string | YYYY-MM-DD required |
| startTime | string | HH:MM format required |
| endTime | string | HH:MM format required |
Cancels a pending or confirmed booking and refunds the amount to the user's cash wallet balance.
Recurring Bookings
Returns all active recurring bookings for the authenticated user.
Request Body
| Parameter | Type | Description |
|---|---|---|
| courtId | number | Court ID required |
| facilityId | number | Facility ID required |
| dayOfWeek | number | 0 (Sun) - 6 (Sat) required |
| startTime | string | HH:MM required |
| endTime | string | HH:MM required |
| startDate | string | Recurrence start date required |
| endDate | string | Recurrence end date required |
Cart & Orders
Returns the authenticated user's current cart items with product details.
Request Body
| Parameter | Type | Description |
|---|---|---|
| productId | number | Product ID required |
| quantity | number | Quantity (default: 1) |
Request Body
| Parameter | Type | Description |
|---|---|---|
| quantity | number | New quantity required |
Removes the specified item from the user's cart.
Request Body
| Parameter | Type | Description |
|---|---|---|
| facilityId | number | Pickup facility required |
Returns all orders for the authenticated user, sorted by most recent.
Returns order details including items, pickup code, and status.
Cancels a pending order and refunds the amount to the user's wallet.
Wallet
Response
{
"code": 1,
"data": {
"cashBalance": "150.00",
"giftBalance": "25.00"
}
}
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| limit | number | Results per page (default: 20) |
| offset | number | Pagination offset |
Products & Shop
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| facilityId | number | Filter by facility |
| category | string | Filter by category |
| search | string | Search by name |
| sort | string | popular, newest, price_asc, price_desc |
Returns full product details including images, pricing, and stock levels.
Returns active promotional banners for the business.
Returns the user's list of favorited products.
Adds or removes a product from the user's favorites (toggle behavior).
Coaches & Lessons
Returns coaches affiliated with your business's facilities.
Returns detailed coach profile including specializations, ratings, and available slots.
Request Body
| Parameter | Type | Description |
|---|---|---|
| coachId | number | Coach ID required |
| facilityId | number | Facility ID required |
| date | string | YYYY-MM-DD required |
| startTime | string | HH:MM required |
| endTime | string | HH:MM required |
| lessonType | string | private, semi_private, group |
Returns all coaching lessons for the authenticated user.
Cancels a scheduled coaching lesson.
Programmes, Classes & Events
Returns programmes offered by your business's facilities.
Enrolls the user in the specified programme. Payment is deducted from wallet.
Returns available group classes across your facilities.
Enrolls the user in the specified group class.
Returns upcoming events at your facilities.
Registers the user for the specified event.
Subscriptions
Returns subscription tiers available for your business.
Returns the user's active and past subscriptions.
Request Body
| Parameter | Type | Description |
|---|---|---|
| planId | number | Subscription tier ID required |
Cancels the specified active subscription.
Waitlist
Request Body
| Parameter | Type | Description |
|---|---|---|
| courtId | number | Court ID required |
| date | string | YYYY-MM-DD required |
| startTime | string | HH:MM required |
| endTime | string | HH:MM required |
Returns all active waitlist entries for the user.
Removes the user from the specified waitlist.
Rewards & Loyalty
Response
{
"code": 1,
"data": {
"points": 1250,
"tier": "silver",
"totalEarned": 3500,
"totalSpent": 2250
}
}
Returns available reward tiers and their benefits.
Notifications & Extras
Returns the user's unread and recent notifications.
Marks the specified notification as read.
Returns the user's favorited facilities, courts, and coaches.
Request Body
| Parameter | Type | Description |
|---|---|---|
| targetType | string | facility, court, coach required |
| targetId | number | ID of the target required |
Returns badges earned by the user based on their activity.
Returns or generates the user's unique referral code for sharing.
Error Handling
The API uses standard HTTP status codes along with a consistent error response format:
| Status | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - Missing or invalid parameters |
| 401 | Unauthorized - Invalid or missing API key / JWT token |
| 403 | Forbidden - Feature not enabled for your business |
| 404 | Not Found - Resource doesn't exist or doesn't belong to your business |
| 409 | Conflict - Resource already exists (e.g., duplicate booking) |
| 429 | Rate Limited - Too many requests |
Error Response
{
"code": 0,
"msg": "Insufficient wallet balance"
}
Rate Limits
API requests are rate-limited per API key. Current limits:
| Tier | Limit |
|---|---|
| Standard | 100 requests per minute |
| Premium | 500 requests per minute |
When rate limited, the API returns a 429 status code. Implement exponential backoff in your application.