Admin - Organizations Management
Base path: /api/v1/admin/organizations
Used by: admin-booki-web-app · Role: admin
organizationId: Not applicable (admin sees all)
Admin organization endpoints provide access to manage all organizations on the platform, view their details, and update their status.
GET /api/v1/admin/organizations — List All Organizations
Auth: Protected (Authorization: Bearer <accessToken>) · admin
Used by: admin-booki-web-app · Role: admin
Description: Fetch all organizations across the platform.
Request
Query Parameters (optional):
page(number, default: 1)limit(number, default: 10, max: 100)search(string): Search by name or slugstatus(string, default:all):all|active|suspended|deletedsort(string, default:_id)order(string, default:desc):asc|desc
GET /api/v1/admin/organizations?page=1&search=salon
Response (200 OK)
{
"items": [
{
"_id": "507f191e810c19729de860ea",
"name": "Booki Salon",
"slug": "booki-salon",
"status": "active",
"createdAt": "2025-12-01T10:15:00Z"
}
],
"pages": 1,
"pageRange": "1-1 of 1"
}
cURL Example
curl -X GET "http://localhost:4001/api/v1/admin/organizations?page=1&limit=20" \
-H "Authorization: Bearer ADMIN_TOKEN"
GET /api/v1/admin/organizations/:orgId — Get Organization Details
Auth: Protected (Authorization: Bearer <accessToken>) · admin
Used by: admin-booki-web-app · Role: admin
Description: Fetch detailed information about a specific organization.
Request
GET /api/v1/admin/organizations/507f191e810c19729de860ea
Path Parameters:
orgId(string, required): Organization ID
Response (200 OK)
{
"organization": {
"_id": "507f191e810c19729de860ea",
"name": "Booki Salon",
"slug": "booki-salon",
"description": "Premium salon services",
"email": "owner@bookisalon.com",
"phone": "09161234567",
"website": "https://bookisalon.com",
"address": {
"street": "123 Main St",
"city": "Manila",
"state": "NCR",
"country": "Philippines",
"zipCode": "1000"
},
"plan": "premium",
"status": "active",
"subscriptionStatus": "active",
"subscriptionStartDate": "2026-01-01T00:00:00Z",
"nextBillingDate": "2026-04-01T00:00:00Z",
"monthlyFee": 1999,
"createdAt": "2025-12-01T10:15:00Z",
"updatedAt": "2026-04-01T10:00:00Z"
},
"statistics": {
"totalBookings": 150,
"completeBookings": 142,
"cancelledBookings": 5,
"noShowBookings": 3,
"totalRevenue": 45000,
"platformFee": 4500,
"netRevenue": 40500,
"activeCustomers": 85,
"totalCustomers": 120,
"branches": 3,
"packages": 15,
"staff": 8
},
"paymentMethods": [
{
"type": "maya",
"status": "connected",
"connectedAt": "2026-02-01T10:00:00Z"
}
]
}
cURL Example
curl -X GET http://localhost:4001/api/v1/admin/organizations/507f191e810c19729de860ea \
-H "Authorization: Bearer ADMIN_TOKEN"
PATCH /api/v1/admin/organizations/:id/:status — Update Organization Status
Auth: Protected (Authorization: Bearer <accessToken>) · admin
Used by: admin-booki-web-app · Role: admin
Description: Change organization status. The status is passed as a URL path segment.
Request
PATCH /api/v1/admin/organizations/507f191e810c19729de860ea/suspend
Path Parameters:
id(string, required): Organization IDstatus(string, required): Action to apply —activate|suspend|delete
No request body needed — action is set via the URL path segment.
Response (200 OK)
{
"message": "Status updated successfully."
}
cURL Example
curl -X PATCH http://localhost:4001/api/v1/admin/organizations/507f191e810c19729de860ea/suspend \
-H "Authorization: Bearer ADMIN_TOKEN"
Organization Status Reference
| Status | Description | Bookings Allowed |
|---|---|---|
active | Live and operating | Yes |
inactive | Temporarily disabled | No |
suspended | Suspended (payment issue, abuse) | No |
deleted | Soft-deleted | No (archived) |
Organization Plans
| Plan | Monthly Fee | Branches | Priority | Features |
|---|---|---|---|---|
starter | ₱999 | 1 | Normal | Basic features |
professional | ₱1,499 | 3 | High | Advanced features |
premium | ₱1,999 | Unlimited | VIP | All features + support |
Notes
- All admin organization endpoints require the
adminrole. - Suspended organizations can be reactivated once issues are resolved.
