Create Invoice Addition (v1)
Create a new invoice addition for a workspace.
Method & Path
POST /api/v1/admin/workspaces/:workspaceId/invoice-additions
Description
Creates a new invoice addition (custom charge) for a workspace. Invoice additions are non-discountable charges that are added to the monthly subscription invoice. The total is automatically calculated as quantity × unitPrice.
Authentication
Required: Admin authentication with businesses.manage permission.
Headers
Authorization: Bearer <admin_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | The workspace ID |
Request Body
{
"reason": "Additional 1GB storage",
"quantity": 1,
"unitPrice": 2.00
}
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Description/reason for the addition (1-500 characters) |
quantity | number | Yes | Quantity (must be > 0) |
unitPrice | number | Yes | Unit price in USD (must be >= 0) |
Response 201 Created
{
"message": "Invoice addition created successfully",
"addition": {
"id": "507f1f77bcf86cd799439013",
"reason": "Additional 1GB storage",
"quantity": 1,
"unitPrice": 2.00,
"total": 2.00,
"createdAt": "2024-01-15T10:00:00.000Z",
"createdBy": "507f1f77bcf86cd799439014"
}
}
Common Errors
- 401 Unauthorized: Missing or invalid admin authentication token
- 403 Forbidden: Insufficient permissions (missing
businesses.managepermission) - 404 Not Found: Workspace not found
- 400 Bad Request: Invalid request body or validation errors
- 422 Unprocessable Entity: Validation errors (e.g., reason too long, invalid quantity/price)
- 500 Internal Server Error: Server error