Skip to main content

List Nutrition Clients (v1)

Method & Path

GET /api/v1/workspace/:workspaceId/nutrition/clients

Description

Retrieves a paginated list of nutrition clients in the workspace.

Authentication

Required: Workspace token with nutrition view permission.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <token>

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by name, email, or phone
tagsstringNoComma-separated tag names
limitnumberNoNumber of results (default: 50, max: 100)
offsetnumberNoPagination offset (default: 0)

Response 200 OK

{
"clients": [
{
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"name": "أحمد محمد",
"email": "ahmed@example.com",
"phone": "+972501234567",
"birthDate": "1990-05-15T00:00:00.000Z",
"gender": "male",
"height": 175,
"currentWeight": 85,
"targetWeight": 75,
"activityLevel": "moderate",
"healthConditions": ["diabetes"],
"allergies": ["peanuts"],
"goals": "خسارة 10 كيلو",
"tags": ["vip"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
],
"total": 25
}

Common Errors

  • 401 Unauthorized: Missing or invalid token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Workspace not found