Get Expense (v1)
Method & Path
GET /api/v1/client/workspace/:workspaceId/expenses/:expenseId
Description
Retrieve a single expense record by ID.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with financial permissions.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
expenseId | string | Yes | Expense identifier |
Response 200 OK
{
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"amount": 1500.00,
"date": "2025-01-15T10:30:00.000Z",
"time": "10:30",
"description": "Monthly office rent",
"category": "rent",
"receiptImage": {
"url": "https://storage.googleapis.com/bucket/workspace-expenses/expense-id/receipt-1234567890-abc123.webp",
"path": "workspace-expenses/expense-id/receipt-1234567890-abc123.webp",
"width": 1000,
"height": 1000,
"sizeBytes": 50000,
"contentType": "image/webp"
},
"notes": "Paid via bank transfer",
"createdBy": "507f1f77bcf86cd799439014",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
Common Errors
400 Bad Request: Invalid expense ID format
401 Unauthorized: Missing or invalid authentication token
403 Forbidden: User does not have permission to view financial data
404 Not Found: Expense or workspace not found
500 Internal Server Error: Server error occurred while processing the request