Create Culture Sensitivity Antibiotic (v1)
Method & Path
POST /api/v1/workspace/:workspaceId/labs/culture-sensitivity-antibiotics
Actual backend path: /v1/workspace/:workspaceId/labs/culture-sensitivity-antibiotics
Description
Create a new culture sensitivity antibiotic in the workspace.
Authentication
Required: JWT token in Authorization header
Required Permissions:
labs.manage
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier (MongoDB ObjectId) |
Request Body
{
"name": "Amoxicillin",
"symbol": "AMX",
"sensitivity": null
}
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Antibiotic name (1-500 characters) |
symbol | string | No | Abbreviation/symbol (max 100 characters) |
sensitivity | string | No | Sensitivity value when found (e.g. S, I, R; max 100 characters) |
Response 201 Created
{
"cultureSensitivityAntibiotic": {
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"name": "Amoxicillin",
"symbol": "AMX",
"sensitivity": null,
"deletedAt": null,
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-15T10:00:00.000Z"
}
}
Common Errors
400 Bad Request: Invalid request body or missing required fields
401 Unauthorized: Missing or invalid authentication token
403 Forbidden: Insufficient permissions (labs.manage required)
404 Not Found: Workspace not found
409 Conflict: Item with the same name already exists in the workspace
422 Validation Error: Invalid workspace ID format or validation errors