Rooms API
Manage rooms within projects and their line item equipment.
GET /api/v1/projects/{projectId}/rooms
List all rooms in a project with their equipment count and totals.
Response
{
"success": true,
"data": {
"projectId": 123,
"projectName": "Corporate HQ AV Upgrade",
"rooms": [
{
"id": 1,
"roomName": "Conference Room A",
"equipmentCount": 12,
"totalCost": 15250.00,
"roomOrder": 1,
"isArchived": false
}
],
"totalCount": 5
}
}
POST /api/v1/projects/{projectId}/rooms
Create a new room in a project.
Request Body
{
"roomName": "Board Room"
}
Response (201 Created)
{
"success": true,
"data": {
"roomId": 6,
"projectId": 123
},
"message": "Room created successfully",
"timestamp": "2024-12-25T12:00:00Z"
}
Note: All room and line item operations use nested routes under projects.
See the detailed endpoints in the Projects API section.
Summary of Room/Line Item Routes
Rooms and line items are accessed via nested project routes:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/projects/{projectId}/rooms |
List all rooms in a project |
| POST | /api/v1/projects/{projectId}/rooms |
Create a new room |
| PUT | /api/v1/projects/{projectId}/rooms/{roomId} |
Update a room |
| DELETE | /api/v1/projects/{projectId}/rooms/{roomId} |
Delete a room |
| GET | /api/v1/projects/{projectId}/rooms/{roomId}/items |
List line items in a room |
| POST | /api/v1/projects/{projectId}/rooms/{roomId}/items |
Add a line item to a room |
| PUT | /api/v1/projects/{projectId}/rooms/{roomId}/items |
Replace a room's whole equipment list — see Replace Equipment |
| PUT | /api/v1/projects/{projectId}/rooms/{roomId}/items/{itemId} |
Update a line item |
| DELETE | /api/v1/projects/{projectId}/rooms/{roomId}/items/{itemId} |
Delete a line item |
| PUT | /api/v1/projects/{projectId}/rooms/{roomId}/order |
Reorder a room's line items and section dividers together |
| POST | /api/v1/projects/{projectId}/rooms/{roomId}/sections/{dividerId}/move |
Move a whole section, heading and items together, in one call |
| POST | /api/v1/projects/{projectId}/rooms/{roomId}/dividers |
Add a section divider to a room |
| PUT | /api/v1/projects/{projectId}/rooms/{roomId}/dividers/{dividerId} |
Rename or reposition a section divider |
| DELETE | /api/v1/projects/{projectId}/rooms/{roomId}/dividers/{dividerId} |
Delete a section divider |
